OntologyServiceImpl implements OntologyService { @Override public PhenotypeTerm getPhenotypeTermForHpoId(String hpoId) { try { return hpoIdChecker.getCurrentTerm(hpoId); } catch (IllegalArgumentException ex) { logger.warn("{}", ex.getMessage()); } return null; } @Autowired  OntologyServiceImpl(HumanPhenotypeOntologyDao hpoDao, MousePhenotypeOntologyDao mpoDao, ZebraFishPhenotypeOntologyDao zpoDao); @Cacheable(value = "hpo") @Override Set<PhenotypeTerm> getHpoTerms(); @Cacheable(value = "mpo") @Override Set<PhenotypeTerm> getMpoTerms(); @Cacheable(value = "zpo") @Override Set<PhenotypeTerm> getZpoTerms(); @Override Set<PhenotypeMatch> getHpoMatchesForHpoTerm(PhenotypeTerm hpoTerm); @Override Set<PhenotypeMatch> getMpoMatchesForHpoTerm(PhenotypeTerm hpoTerm); @Override Set<PhenotypeMatch> getZpoMatchesForHpoTerm(PhenotypeTerm hpoTerm); @Override PhenotypeTerm getPhenotypeTermForHpoId(String hpoId); @Override List<String> getCurrentHpoIds(List<String> hpoIds);  }
@Test public void testReturnsPhenotypeTermForGivenHpoId() { assertThat(instance.getPhenotypeTermForHpoId(fingerJointHyperExtensibility.getId()), equalTo(fingerJointHyperExtensibility)); }
@Test public void testReturnsNullForGivenHpoIdWhenHpoIdIsUnrecognised() { assertThat(instance.getPhenotypeTermForHpoId("invalidId"), equalTo(null)); }