### Question:
ClassScanner { public ClassScanner excludeClassNames(String... classNames) { excludeClassNames.addAll(asList(classNames)); return this; }  ClassScanner excludeClassNames(String... classNames); ModuleWithProviders<?> scan(String... packagePrefixes);  }### Answer:
@Test public void testExcludeClassNames() { ClassScanner scanner = new ClassScanner().excludeClassNames(XCmp.class.getName()); ModuleWithProviders<?> mod = scanner.scan(ClassScannerTest.class.getPackage() .getName()); assertThat(mod.getDeclarations()).hasSize(4); assertThat(mod.getDeclarations()).contains(ACmp.class, ADirective.class, BPipe.class, BCmp.class); }