@Test
  public void properlyDefersProcessing_packageElement() {
    JavaFileObject dependentTestFileObject =
        JavaFileObjects.forSourceLines(
            "test.ClassA",
            "package test;",
            "",
            "@" + GeneratesCode.class.getCanonicalName(),
            "public class ClassA {",
            "}");
    JavaFileObject generatesCodeFileObject =
        JavaFileObjects.forSourceLines(
            "test.package-info",
            "@" + RequiresGeneratedCode.class.getCanonicalName(),
            "@" + ReferencesAClass.class.getCanonicalName() + "(SomeGeneratedClass.class)",
            "package test;");
    requiresGeneratedCodeDeferralTest(dependentTestFileObject, generatesCodeFileObject);
  }
Report an error for any class annotated.
common/src/test/java/com/google/auto/common/BasicAnnotationProcessorTest.java