DefaultFileCollectionResolveContext context = new DefaultFileCollectionResolveContext();
files.resolve(context);
List<? extends FileTree> contents = context.resolveAsFileTrees();
FileTreeAdapter adapter = (FileTreeAdapter) contents.get(0);
assertThat(adapter.getTree(), instanceOf(DirectoryFileTree.class));
DirectoryFileTree directoryFileTree = (DirectoryFileTree) adapter.getTree();
assertThat(directoryFileTree.getDir(), equalTo(classesDir));
assertThat(directoryFileTree.getPatterns().getIncludes(), equalTo(includes));
assertThat(directoryFileTree.getPatterns().getExcludes(), equalTo(excludes));
}