for (BodyDeclaration decl : bean.getMembers()) {
if (decl instanceof MethodDeclaration) {
index = (MethodDeclaration)decl;
}
}
Parameter param = index.getParameters().get(0);
AnnotationExpr annotation = param.getAnnotations().get(0);
param.getAnnotations().clear();
file.assertSave();
// helper.assertRemove("metamodel", "param", "A.java");
// Recompile
// we should have a way to test the error kind more precisely
/*List<CompilationError> errors = */helper.assertCompile();
// assertEquals(1, errors.size());
// Add back @Param
param.getAnnotations().add(annotation);
file.assertSave();
// Recompile
helper.assertCompile();