@CanIgnoreReturnValue
  private RequiresGeneratedCodeProcessor requiresGeneratedCodeRejectionTest(
      JavaFileObject classAFileObject) {
    JavaFileObject classBFileObject =
        JavaFileObjects.forSourceLines(
            "test.ClassB",
            "package test;",
            "",
            "@" + GeneratesCode.class.getCanonicalName(),
            "public class ClassB {}");
    RequiresGeneratedCodeProcessor requiresGeneratedCodeProcessor =
        new RequiresGeneratedCodeProcessor();
    Compilation compilation =
        javac()
            .withProcessors(requiresGeneratedCodeProcessor, new GeneratesCodeProcessor())
            .compile(classAFileObject, classBFileObject);
    assertThat(compilation).succeeded();
    assertThat(compilation).generatedSourceFile("test.GeneratedByRequiresGeneratedCodeProcessor");
    assertThat(requiresGeneratedCodeProcessor.rejectedRounds).isEqualTo(1);
    return requiresGeneratedCodeProcessor;
  }
Report an error for any class annotated.
common/src/test/java/com/google/auto/common/BasicAnnotationProcessorTest.java