@Test
public void testCanonicalNames() throws Exception {

  pn.setGenus("Abies");
  assertEquals("Abies", pn.canonicalName());
  
  pn.setSpecificEpithet("alba");
  assertEquals("Abies alba", pn.canonicalName());
  
  pn = new ParsedName();
  pn.setGenus("Abies");
  pn.setSpecificEpithet("alba");
  pn.setRank(Rank.VARIETY);
  pn.setCombinationAuthorship(Authorship.yearAuthors("1887", "Mill."));
  pn.setBasionymAuthorship(Authorship.authors("Carl."));
  pn.setNotho(NamePart.GENERIC);
  pn.setInfraspecificEpithet("alpina");
  pn.setTaxonomicNote("Döring");
  pn.setNomenclaturalNote("nom. illeg.");
  
  assertEquals("Abies alba alpina", NameFormatter.canonicalMinimal(pn));
  assertEquals("× Abies alba var. alpina", NameFormatter.canonicalWithoutAuthorship(pn));
  assertEquals("× Abies alba var. alpina (Carl.) Mill., 1887", NameFormatter.canonical(pn));
  assertEquals("× Abies alba var. alpina (Carl.) Mill., 1887 Döring, nom. illeg.", NameFormatter.canonicalComplete(pn));
}