Hi, suppose I want to mock a method with the following signature:
public A foo(A a)
I want foo to be mocked in a way that it returned what it received (that is the same instance a)
I tried unsuccessfully the following:
Capture<A> capture = new Capture();
expect(myclass.foo(capture)).andReturn(capture.getValue());
This does not work because the capture is still empty when getValue() is called.
Any ideas?
Thanks