testAnnotation(_Tuple(NO_COMMENTS, _Annotation("foo", _Some(_ElementValuePairs(list(_AnnotationKeyValue("x", _AnnotationValueExpression(_LiteralExpression(_NullLiteral()))), _AnnotationKeyValue("y", _AnnotationValueAnnotation(_Annotation("bar", Optional.<AnnotationElement>_None())))))))), "@foo( x = null, y = @bar )");
}
private void testAnnotation(Tuple<List<JavaComment>, Annotation> expected, String input) throws Exception {
final ParserImpl p = parserImpl(input);
final Tuple<List<JavaComment>, Annotation> ca = p.annotation(true);
assertEquals("[]", p.errors().toString());
assertEquals(expected.toString(), ca.toString());
}
}