NameParserGbifV1 implements NameParser { public String parseToCanonicalOrScientificName(String scientificName) { return parseToCanonicalOrScientificName(scientificName, null); } NameParserGbifV1();  NameParserGbifV1(long timeout);  NameParserGbifV1(org.gbif.nameparser.api.NameParser parser); @Override ParsedName parse(String s, @Nullable Rank rank); @Override ParsedName parse(String scientificName); @Override ParsedName parseQuietly(String scientificName, @Nullable Rank rank); @Override ParsedName parseQuietly(String scientificName); @Override // parses the name without authorship and returns the ParsedName.canonicalName() string String parseToCanonical(String scientificName, @Nullable Rank rank); @Override String parseToCanonical(String scientificName); String parseToCanonicalOrScientificName(String scientificName); String parseToCanonicalOrScientificName(String scientificName, @Nullable Rank rank);  }
@Test public void parseToCanonicalOrScientificName() throws Exception { assertEquals("BOLD:AAX3687", parser.parseToCanonicalOrScientificName("BOLD:AAX3687", Rank.SPECIES)); assertEquals("Abies alba", parser.parseToCanonicalOrScientificName("Abies alba")); assertEquals("Abies alba x Pinus graecus L.", parser.parseToCanonicalOrScientificName("Abies alba x Pinus graecus L.")); }