@Test
public void testAnnotation() {

  Parser<Annotation> parser = StatementParser.annotation(ExpressionParser.IDENTIFIER);
  TerminalParserTest.assertResult(parser, "@Foo", Annotation.class, "@Foo");
  TerminalParserTest.assertResult(parser, "@org.codehaus.jparsec.Foo",
      Annotation.class, "@org.codehaus.jparsec.Foo");
  TerminalParserTest.assertResult(parser, "@Foo()", Annotation.class, "@Foo()");
  TerminalParserTest.assertResult(parser, "@Foo(foo)", Annotation.class, "@Foo(foo)");
  TerminalParserTest.assertResult(parser, "@Foo(foo=bar)", Annotation.class, "@Foo(foo=bar)");
  TerminalParserTest.assertResult(parser, "@Foo(foo={bar})", Annotation.class, "@Foo(foo={bar})");
  TerminalParserTest.assertResult(parser, "@Foo(foo={bar}, a=b)", Annotation.class, "@Foo(foo={bar}, a=b)");
  TerminalParserTest.assertFailure(parser, "Foo", 1, 1);
  TerminalParserTest.assertFailure(parser, "@Foo({{foo}})", 1, 7);
}