sometimes, we need to mock void method like this:
public void printLine() {
//... ...
}
how to mock it by using mockito ?
here it is:
Mockito.doNothing().when(handler).printLine();
sometimes, we need to mock void method like this:
public void printLine() {
//... ...
}
how to mock it by using mockito ?
here it is:
Mockito.doNothing().when(handler).printLine();