@Override
    protected Iterable<? extends Step> steps() {
      return ImmutableList.of(
          new Step() {
            @Override
            public ImmutableSet<? extends Element> process(
                ImmutableSetMultimap<String, Element> elementsByAnnotation) {
              processArguments.add(ImmutableSetMultimap.copyOf(elementsByAnnotation));
              TypeElement requiredClass =
                  processingEnv.getElementUtils().getTypeElement("test.SomeGeneratedClass");
              if (requiredClass == null) {
                rejectedRounds++;
                return ImmutableSet.copyOf(elementsByAnnotation.values());
              }
              generateClass(processingEnv.getFiler(), "GeneratedByRequiresGeneratedCodeProcessor");
              return ImmutableSet.of();
            }

            @Override
            public ImmutableSet<String> annotations() {
              return ImmutableSet.of(
                  ENCLOSING_CLASS_NAME + ".RequiresGeneratedCode",
                  ENCLOSING_CLASS_NAME + ".TypeParameterRequiresGeneratedCode");
            }
          });
    }
Rejects elements unless the class generated by {@link GeneratesCode}'s processor is present.
common/src/test/java/com/google/auto/common/BasicAnnotationProcessorTest.java