HealthCheckDao { @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "jdbc is injected") public void checkDatabaseConnection() { jdbc.query("select status, type from nflow_workflow where id = 0", resultSet -> null); } @Inject  HealthCheckDao(@NFlow JdbcTemplate jdbcTemplate); @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "jdbc is injected") void checkDatabaseConnection();  }
@Test public void checkDatabaseConnectionDoesntThrowExceptionWithWorkingDatabase() { healthCheckDao.checkDatabaseConnection(); }