@Test public void speciesNamesAreNormalised() { assertThat(subject.get("homo sapiens"), not(is(SpeciesProperties.UNKNOWN))); assertThat(subject.get("homo sapiens"), is(subject.get("HoMo_SaPieNs"))); assertThat(subject.get("homo sapiens"), is(subject.get("Homo sapiens"))); assertThat(subject.get("hordeum vulgare"), not(is(SpeciesProperties.UNKNOWN))); assertThat(subject.get("hordeum vulgare"), is(subject.get("Hordeum vulgare subsp. vulgare"))); assertThat(subject.get("hordeum vulgare"), is(subject.get("Hordeum_vulgare"))); }
public SpeciesProperties get(String speciesName) { SpeciesProperties result = nameToSpecies.get(normalise(speciesName)); return result != null ? result : SpeciesProperties.UNKNOWN; }
SpeciesPropertiesTrader { public SpeciesProperties get(String speciesName) { SpeciesProperties result = nameToSpecies.get(normalise(speciesName)); return result != null ? result : SpeciesProperties.UNKNOWN; } }
SpeciesPropertiesTrader { public SpeciesProperties get(String speciesName) { SpeciesProperties result = nameToSpecies.get(normalise(speciesName)); return result != null ? result : SpeciesProperties.UNKNOWN; }  }
SpeciesPropertiesTrader { public SpeciesProperties get(String speciesName) { SpeciesProperties result = nameToSpecies.get(normalise(speciesName)); return result != null ? result : SpeciesProperties.UNKNOWN; }  @Inject void setSpeciesPropertiesDao(SpeciesPropertiesDao speciesPropertiesDao); @PostConstruct String refresh(); SpeciesProperties get(String speciesName); Collection<SpeciesProperties> getAll(); }
SpeciesPropertiesTrader { public SpeciesProperties get(String speciesName) { SpeciesProperties result = nameToSpecies.get(normalise(speciesName)); return result != null ? result : SpeciesProperties.UNKNOWN; }  @Inject void setSpeciesPropertiesDao(SpeciesPropertiesDao speciesPropertiesDao); @PostConstruct String refresh(); SpeciesProperties get(String speciesName); Collection<SpeciesProperties> getAll();  }