### Question:
RecursivePropertyTypeScanner implements TypeScanner { @Override public Set<Class<?>> findTypesToDocument(Collection<? extends Type> rootTypes) { Set<Class<?>> allTypes = new HashSet<>(); rootTypes.forEach(type -> exploreType(type, allTypes)); return allTypes; } RecursivePropertyTypeScanner(PropertyScanner scanner); Predicate<? super Class<?>> getTypeFilter(); void setTypeFilter(Predicate<? super Class<?>> typeFilter); Predicate<? super Class<?>> getTypeInspectionFilter(); void setTypeInspectionFilter(Predicate<? super Class<?>> typeInspectionFilter); Function<Class<?>, Set<Class<?>>> getTypeMapper(); void setTypeMapper(Function<Class<?>, Set<Class<?>>> mapper); @Override Set<Class<?>> findTypesToDocument(Collection<? extends Type> rootTypes);  }### Answer:
@Test public void findTypes_simpleString() { Set<Type> rootTypes = Collections.singleton(String.class); assertSetEquals(explorer.findTypesToDocument(rootTypes), String.class); }
@Test public void findTypes_simpleCharacter() { Set<Type> rootTypes = Collections.singleton(Character.class); assertSetEquals(explorer.findTypesToDocument(rootTypes), Character.class); }
@Test public void findTypes_customType() { Set<Type> rootTypes = Collections.singleton(Custom.class); assertSetEquals(explorer.findTypesToDocument(rootTypes), Custom.class, Long.class); }
@Test public void findTypes_inheritedFields() { Set<Type> rootTypes = Collections.singleton(Child.class); assertSetEquals(explorer.findTypesToDocument(rootTypes), Child.class, Double.class, Long.class); }
@Test public void findTypes_complexHierarchy() { Set<Type> rootTypes = Collections.singleton(TestRoot.class); assertSetEquals(explorer.findTypesToDocument(rootTypes), TestRoot.class, WithCustomObject.class, WithPrimitives.class, Custom.class, Long.class, String.class, int.class); }