@Test
  public void properlyDefersProcessing_stepRejectingOverloadedExecutableElements() {
    JavaFileObject classAFileObject =
        JavaFileObjects.forSourceLines(
            "test.ClassA",
            "package test;",
            "",
            "public class ClassA {",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void overloadedMethod(int x) {}",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void overloadedMethod(float x) {}",
            "  @" + OneMethodAtATime.class.getCanonicalName(),
            "  public void overloadedMethod(double x) {}",
            "}");
    OneOverloadedMethodAtATimeProcessor oneOverloadedMethodAtATimeProcessor =
        new OneOverloadedMethodAtATimeProcessor();
    Compilation compilation =
        javac().withProcessors(oneOverloadedMethodAtATimeProcessor).compile(classAFileObject);

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

    assertThat(oneOverloadedMethodAtATimeProcessor.processArguments())
        .comparingElementsUsing(setMultimapValuesByString())
        .containsExactly(
            ImmutableSetMultimap.of(
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(int)",
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(float)",
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(double)"),
            ImmutableSetMultimap.of(
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(int)",
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(double)"),
            ImmutableSetMultimap.of(
                OneMethodAtATime.class.getCanonicalName(), "overloadedMethod(double)"))
        .inOrder();
  }
Report an error for any class annotated.
common/src/test/java/com/google/auto/common/BasicAnnotationProcessorTest.java