@Test
public void testIdentifyClassFilesWithAntScannerWithExcludes() {

    Map<String, String> parameters = Maps.newHashMap();
    parameters.put("baseDir", TEST_CLASSES_DIR);
    parameters.put("includes", "**/*.class");
    parameters.put("excludes", "**/*Test.class");
    List<File> files = FileNameUtil.identifyFiles(parameters);
    String thisFileName = this.getClass().getCanonicalName().replaceAll("\\.", "/");
    File thisTestFile = new File(TEST_CLASSES_DIR + thisFileName + ".class");
    assertThat(files.contains(new File(thisTestFile.getPath())), CoreMatchers.is(false));
    String aTestFileName = A.class.getCanonicalName().replaceAll("\\.", "/");
    File aTestFile = new File(TEST_CLASSES_DIR + aTestFileName + ".class");
    assertThat(files.contains(new File(aTestFile.getPath())), CoreMatchers.is(true));
}