@Test
  public void properlyDefersProcessing_stepRejectingExecutableElements() {
    JavaFileObject classAFileObject =
        JavaFileObjects.forSourceLines(
            "test.ClassA",
            "package test;",
            "",
            "public class ClassA {",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void method0() {}",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void method1() {}",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void method2() {}",
            "}");
    OneMethodAtATimeProcessor oneMethodAtATimeProcessor = new OneMethodAtATimeProcessor();
    Compilation compilation =
        javac().withProcessors(oneMethodAtATimeProcessor).compile(classAFileObject);

    assertThat(compilation).succeeded();
    assertThat(oneMethodAtATimeProcessor.rejectedRounds).isEqualTo(2);

    assertThat(oneMethodAtATimeProcessor.processArguments())
        .comparingElementsUsing(setMultimapValuesByString())
        .containsExactly(
            ImmutableSetMultimap.of(
                OneMethodAtATime.class.getCanonicalName(), "method0()",
                OneMethodAtATime.class.getCanonicalName(), "method1()",
                OneMethodAtATime.class.getCanonicalName(), "method2()"),
            ImmutableSetMultimap.of(
                OneMethodAtATime.class.getCanonicalName(), "method1()",
                OneMethodAtATime.class.getCanonicalName(), "method2()"),
            ImmutableSetMultimap.of(OneMethodAtATime.class.getCanonicalName(), "method2()"))
        .inOrder();
  }
Report an error for any class annotated.
common/src/test/java/com/google/auto/common/BasicAnnotationProcessorTest.java