@Test
public void reportsHealthyWhenLogOnlyIsEnabled() throws Exception {

  Connection connection;
  try (Connection c = dataSource.getConnection()) {
    connection = c;
  }
  when(managedDataSource.getConnection()).thenReturn(connection);
  JooqHealthCheck healthCheck = new JooqHealthCheck(managedDataSource, LOG_ONLY);
  assertThat(healthCheck.check().isHealthy()).isTrue();
}