@Test
  public void noInjectApi() throws Exception {
    URL autoFactoryUrl =
        Class.forName("com.google.auto.factory.AutoFactory")
            .getProtectionDomain()
            .getCodeSource()
            .getLocation();
    assertThat(autoFactoryUrl.getProtocol()).isEqualTo("file");
    File autoFactoryFile = new File(autoFactoryUrl.getPath());
    Compiler compiler =
        Compiler.javac()
            .withProcessors(new AutoFactoryProcessor())
            .withClasspath(ImmutableList.of(autoFactoryFile));
    JavaFileObject file = JavaFileObjects.forResource("good/SimpleClass.java");
    Compilation compilation = compiler.compile(file);
    assertThat(compilation).failed();
    assertThat(compilation)
        .hadErrorContaining(
            "Class path for AutoFactory class must include"
                + " jakarta.inject.{Inject,Provider,Qualifier} or"
                + " javax.inject.{Inject,Provider,Qualifier}");
    assertThat(compilation).hadErrorCount(1);
  }
We also don't allow you to have the same annotation appear more than once inside a given
{@code @AnnotationsToApply}, even with the same values.
factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorNegativeTest.java