### Question:
FileSelection { public static FileSelection create(final DrillFileSystem fs, final String parent, final String path) throws IOException { Stopwatch timer = Stopwatch.createStarted(); boolean hasWildcard = path.contains(WILD_CARD); final Path combined = new Path(parent, removeLeadingSlash(path)); final FileStatus[] statuses = fs.globStatus(combined); if (statuses == null) { return null; } final FileSelection fileSel = create(Lists.newArrayList(statuses), null, combined.toUri().getPath()); logger.debug("FileSelection.create() took {} ms ", timer.elapsed(TimeUnit.MILLISECONDS)); if (fileSel == null) { return null; } fileSel.setHadWildcard(hasWildcard); return fileSel; } FileSelection(final List<FileStatus> statuses, final List<String> files, final String selectionRoot);  FileSelection(final List<FileStatus> statuses, final List<String> files, final String selectionRoot,
      final String cacheFileRoot, final boolean wasAllPartitionsPruned);  FileSelection(final List<FileStatus> statuses, final List<String> files, final String selectionRoot,
      final String cacheFileRoot, final boolean wasAllPartitionsPruned, final StatusType dirStatus); protected  FileSelection(final FileSelection selection); String getSelectionRoot(); List<FileStatus> getStatuses(final DrillFileSystem fs); List<String> getFiles(); boolean containsDirectories(DrillFileSystem fs); FileSelection minusDirectories(DrillFileSystem fs); FileStatus getFirstPath(DrillFileSystem fs); void setExpandedFully(); boolean isExpandedFully(); void setExpandedPartial(); boolean isExpandedPartial(); StatusType getDirStatus(); boolean wasAllPartitionsPruned(); static FileSelection create(final DrillFileSystem fs, final String parent, final String path); static FileSelection create(final List<FileStatus> statuses, final List<String> files, final String root,
      final String cacheFileRoot, final boolean wasAllPartitionsPruned); static FileSelection create(final List<FileStatus> statuses, final List<String> files, final String root); static FileSelection createFromDirectories(final List<String> dirPaths, final FileSelection selection,
      final String cacheFileRoot); List<FileStatus> getFileStatuses(); boolean supportDirPrunig(); void setHadWildcard(boolean wc); boolean hadWildcard(); String getCacheFileRoot(); void setMetaContext(MetadataContext context); MetadataContext getMetaContext(); @Override String toString(); public List<String> files; final String selectionRoot; final String cacheFileRoot; }### Answer:
@Test public void testCreateReturnsNullWhenArgumentsAreIllegal() { for (final Object statuses : new Object[] { null, EMPTY_STATUSES}) { for (final Object files : new Object[]{null, EMPTY_FILES}) { for (final Object root : new Object[]{null, EMPTY_ROOT}) { final FileSelection selection = FileSelection.create((List<FileStatus>) statuses, (List<String>) files, (String)root); assertNull(selection); } } } }