public Object doSomething(Object o);
我想嘲笑它。它应该只返回它的参数。我试过:
Capture<Object> copyCaptcher = new Capture<Object>();
expect(mock.doSomething(capture(copyCaptcher)))
.andReturn(copyCatcher.getValue());
但没有成功,我只得到一个 AssertionError 作为java.lang.AssertionError: Nothing captured yet
. 有任何想法吗?