@Test
public void testEnumDef() {

  Parser<Declaration> parser = DeclarationParser.enumDef(IDENTIFIER, FIELD);
  TerminalParserTest.assertResult(parser, "enum Foo {}", EnumDef.class, "enum Foo {}");
  TerminalParserTest.assertResult(parser, "enum Foo {FOO{int x;}}", EnumDef.class, "enum Foo {FOO {int x;}}");
  TerminalParserTest.assertResult(parser, "@For(Test) enum Foo {}", EnumDef.class, "@For(Test) enum Foo {}");
  TerminalParserTest.assertResult(parser, "enum Foo implements Comparable<Foo>, Serializable {}",
      EnumDef.class, "enum Foo implements Comparable<Foo>, Serializable {}");
  TerminalParserTest.assertResult(parser, "enum Foo {ONE, TWO(two); int i; int j;}",
      EnumDef.class, "enum Foo {ONE, TWO(two); int i; int j;}");
  TerminalParserTest.assertResult(parser, "enum Foo {ONE, TWO}", EnumDef.class, "enum Foo {ONE, TWO}");
}