Can Mockito throw the general Exception?
When I do, the test fails with 'org.mockito.exceptions.base.MockitoException: Checked Exception is invalid for this method'
this is my @Test
public void testServiceSomeError() throws ClientProtocolException, IOException {
//Arrange
HealthService service = Mockito.mock(HealthService.class);
when(service.executeX(HOST)).thenCallRealMethod();
when(service.getHTTPResponse("http://" + HOST + "/health")).thenThrow(Exception.class);
//Act
String actual = service.executeX(HOST);
//Assert
assertEquals(ERROR, actual);
}