private void evaluate(File dummySourceFile) throws Throwable {
      JavaCompiler compiler = new EclipseCompiler();
      StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, UTF_8);
      // This hack is only needed in a Google-internal Java 8 environment where symbolic links make
      // it hard for ecj to find the boot class path. Elsewhere it is unnecessary but harmless.
      File rtJar = new File(StandardSystemProperty.JAVA_HOME.value() + "/lib/rt.jar");
      if (rtJar.exists()) {
        List<File> bootClassPath =
            ImmutableList.<File>builder()
                .add(rtJar)
                .addAll(fileManager.getLocation(StandardLocation.PLATFORM_CLASS_PATH))
                .build();
        fileManager.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath);
      }
      Iterable<? extends JavaFileObject> sources = fileManager.getJavaFileObjects(dummySourceFile);
      JavaCompiler.CompilationTask task =
          compiler.getTask(null, fileManager, null, null, null, sources);
      EcjTestProcessor processor = new EcjTestProcessor(statement);
      task.setProcessors(ImmutableList.of(processor));
      assertThat(task.call()).isTrue();
      processor.maybeThrow();
    }
An equivalent to {@link CompilationRule} that uses ecj (the Eclipse compiler) instead of javac.
If the parameterized test is not selecting ecj then this rule has no effect.
common/src/test/java/com/google/auto/common/OverridesTest.java