@Test
  public void havingCriteria() {
    // Criteria should be generated as top-level class (not nested).
    assertAttribute("foo",
            "org.immutables.criteria.processor.FooCriteriaTemplate<R>");

    checkCreator("foo").not().contains("FooCriteriaTemplate.creator()");
    checkCreator("foo").contains("FooCriteria.creator()");


    assertAttribute("nullableFoo",
            "org.immutables.criteria.matcher.OptionalObjectMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>");

    checkCreator("nullableFoo").contains("FooCriteria.creator()");
    checkCreator("nullableFoo").contains("OptionalObjectMatcher.creator()");

    assertAttribute("optionalFoo",
            "org.immutables.criteria.matcher.OptionalObjectMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,java.util.Optional<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>>");

    checkCreator("optionalFoo").contains("FooCriteria.creator()");
    checkCreator("optionalFoo").contains("OptionalObjectMatcher.creator()");

    assertAttribute("listFoo",
            "org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo,java.util.List<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>>");

    checkCreator("listFoo").contains("FooCriteria.creator()");
    checkCreator("listFoo").contains("IterableMatcher.creator()");

    assertAttribute("listListFoo",
            "org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo,java.util.List<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>>,java.util.List<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>,java.util.List<java.util.List<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo>>>");
    assertAttribute("arrayFoo",
            "org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[]>");
    assertAttribute("arrayArrayFoo",
            "org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[]>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[],org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[][]>");
    assertAttribute("listArrayFoo",
            "org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.matcher.IterableMatcher.Template<R,org.immutables.criteria.processor.FooCriteriaTemplate<R>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[]>,org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[],java.util.List<org.immutables.criteria.processor.CriteriaModelProcessorTest.Foo[]>>");
  }
Scans all attributes using reflection and generates a matcher
criteria/common/test/org/immutables/criteria/processor/CriteriaModelProcessorTest.java