I have the following line in the test that I'm trying to write:
when(service.check(anyInt())).thenThrow(new Exception(""));
the problem with this is that I get an error telling:
Required type: Void provided: void
and the method has the return type void:
public void check(int Id) { //DO RANDOM STUFF }
How can I get around this?