java doreturn void

Java
doNothing().when(yourMock).yourMockedMethod();
Source

Also in Java: