@Test void experimentsDatabaseIsUp() { when(experimentDaoMock.countExperiments()).thenReturn(9); assertThat(subject.isDatabaseUp(experimentDaoMock)).isTrue(); }
public boolean isDatabaseUp(ExperimentDao experimentDao) { try { return experimentDao.countExperiments() > 0; } catch (Exception e) { LOGGER.error(e.getMessage()); return false; } }
HealthCheckService { public boolean isDatabaseUp(ExperimentDao experimentDao) { try { return experimentDao.countExperiments() > 0; } catch (Exception e) { LOGGER.error(e.getMessage()); return false; } } }
HealthCheckService { public boolean isDatabaseUp(ExperimentDao experimentDao) { try { return experimentDao.countExperiments() > 0; } catch (Exception e) { LOGGER.error(e.getMessage()); return false; } } HealthCheckService(SolrCloudAdminProxy solrCloudAdminProxy); }
HealthCheckService { public boolean isDatabaseUp(ExperimentDao experimentDao) { try { return experimentDao.countExperiments() > 0; } catch (Exception e) { LOGGER.error(e.getMessage()); return false; } } HealthCheckService(SolrCloudAdminProxy solrCloudAdminProxy); boolean isSolrUp(List<String> solrCollections, String... solrCollectionsWithAliases); boolean isDatabaseUp(ExperimentDao experimentDao); }
HealthCheckService { public boolean isDatabaseUp(ExperimentDao experimentDao) { try { return experimentDao.countExperiments() > 0; } catch (Exception e) { LOGGER.error(e.getMessage()); return false; } } HealthCheckService(SolrCloudAdminProxy solrCloudAdminProxy); boolean isSolrUp(List<String> solrCollections, String... solrCollectionsWithAliases); boolean isDatabaseUp(ExperimentDao experimentDao);  }