HumanPhenotypeOntologyDao implements OntologyDao { @Override public Set<PhenotypeTerm> getAllTerms() { String query = "select id, lcname as term from hpo"; try ( Connection connection = dataSource.getConnection(); PreparedStatement ontologyTermsStatement = connection.prepareStatement(query); ResultSet rs = ontologyTermsStatement.executeQuery()) { return OntologyDaoResultSetProcessor.processOntologyTermsResultSet(rs); } catch (SQLException e) { logger.error("Unable to execute query '{}' for HPO terms", query, e); } return Collections.emptySet(); } HumanPhenotypeOntologyDao(DataSource phenotypeDataSource); @Override Set<PhenotypeTerm> getAllTerms(); @Override Set<PhenotypeMatch> getPhenotypeMatchesForHpoTerm(PhenotypeTerm hpoTerm); Map<String, PhenotypeTerm> getIdToPhenotypeTerms();  }
@Test public void testGetAllTerms() { assertThat(instance.getAllTerms(), equalTo(allHpoTerms)); }