@Test
public void testParseEnum() throws Exception {

  assertEquals(some(Mushroom.chanterelle), parseEnum(Mushroom.flyAgaric).apply("chanterelle"));
  assertEquals(some(Mushroom.deathCap), parseEnum(Mushroom.flyAgaric).apply("deathCap"));
  assertNotEquals(some(Mushroom.kingOysterMushroom), parseEnum(Mushroom.flyAgaric).apply("flyAgaric"));
  assertEquals(none(), parseEnum(Mushroom.flyAgaric).apply("pilz"));
}