Add test has_invalid_annotated_method.