I have a quick question.
Assume I have a class like:
public class Foo {
	public void doSomething() {
		...
	}
}
In a test class, I have a mocked version of this object:
Foo mock = Mockito.mock(Foo.class);

What I would like to do is perform a Mockito.when() on the mock, where I can print out something to the log when the Foo's doSomething() method is called. Since the doSomething() method is void, I am unable to do something like:
Foo mock = Mockito.mock(Foo.class);
Mockito.when(mock.doSomething()).thenAnswer(new Answer() {
	@Override
	public Object answer(InvocationOnMock invocation) throws Throwable {
		System.out.println("Print something");
		return null;
	}	
});

Does anyone know if there is a way to mock a void method for the purpose of printing?