### Question:
DomainClassFinder { public static List<Class<?>> findClasses(final List<String> packages, final URLClassLoader classLoader) { return packages.stream() .map(packageName -> getClasses(classLoader, packageName)) .flatMap(Collection::stream) .filter(DomainClassFinder::isNotPackageInfo) .filter(DomainClassFinder::isNotAnonymousClass) .collect(Collectors.toList()); } private  DomainClassFinder(); static List<Class<?>> findClasses(final List<String> packages, final URLClassLoader classLoader);  }### Answer:
@Test public void withSinglePackage() throws Exception { List<Class<?>> classes = findClasses("com.nitorcreations.testdomain.person"); assertThat(classes.size(), is(4)); }
@Test public void withMultiPackages() throws Exception { List<Class<?>> classes = findClasses("com.nitorcreations.testdomain.person", "com.nitorcreations.testdomain.another"); assertThat(classes.size(), is(5)); }
@Test public void filtersAnonymousClasses() throws Exception { List<Class<?>> classes = findClasses("com.nitorcreations.testdomain.withanonymousclass"); assertThat(classes.size(), is(1)); }