I have a simple class Foo
to be mocked:
public class Foo {
private String name;
public Foo() {
}
public Foo(String name) {
this.nam
To solve your problem of knowing whether the setName() method was called in your code with the specified value use the Mockito verify method.
For example:
verify(mockedFoo, times(1)).setName("test");
Will verify that the mockedFoo.setName() method with the String parameter "test" was called exactly once in the code under test.