@Test public void checkDatabaseConnectionDelegatesToDao() { service.checkDatabaseConnection(); verify(dao).checkDatabaseConnection(); }
public boolean checkDatabaseConnection() { healthCheckDao.checkDatabaseConnection(); return true; }
HealthCheckService { public boolean checkDatabaseConnection() { healthCheckDao.checkDatabaseConnection(); return true; } }
HealthCheckService { public boolean checkDatabaseConnection() { healthCheckDao.checkDatabaseConnection(); return true; } @Inject  HealthCheckService(HealthCheckDao healthCheckDao); }
HealthCheckService { public boolean checkDatabaseConnection() { healthCheckDao.checkDatabaseConnection(); return true; } @Inject  HealthCheckService(HealthCheckDao healthCheckDao); boolean checkDatabaseConnection(); }
HealthCheckService { public boolean checkDatabaseConnection() { healthCheckDao.checkDatabaseConnection(); return true; } @Inject  HealthCheckService(HealthCheckDao healthCheckDao); boolean checkDatabaseConnection();  }