### Question:
ChangeScopeFilter implements ScopeFilter<ChangeScope<Change>, Set<File>> { @Override public boolean isInScope(ChangeScope<Change> changeScope, Set<File> mainSourceDirs) { List<String> filePaths = mainSourceDirs.stream() .map(dir -> changeScope.getAllAffectedClasses().stream() .map(className -> className.replace(JAVA.extension(), CLASS.extension())) .map(name -> dir + File.separator + name) .collect(toList())) .flatMap(List::stream) .collect(toList()); return filePaths.stream() .map(File::new) .anyMatch(File::exists); }  @Override boolean isInScope(ChangeScope<Change> changeScope, Set<File> mainSourceDirs);  }### Answer:
@Test public void isInScope() { Assert.assertTrue(filter.isInScope(changeScope, Collections.singleton(new File("./target/test-classes")))); }
@Test public void notInScope() { Assert.assertFalse(filter.isInScope(changeScope, Collections.singleton(new File("./non-existing-dir")))); }