@Test
public void whenNotConnectingToDatabaseHealthCheckReturnsUnhealthly() {

  RuntimeException exception = new RuntimeException("test-exception");
  when(healthCheckService.checkDatabaseConnection()).thenThrow(exception);
  HealthCheck.Result result = check.check();
  assertEquals(false, result.isHealthy());
  assertEquals(exception, result.getError());
}