doThrow(new Exception()).when(service.method(anyString(), anyBoolean(), anyString()));
Does not working because the method returns void.