### Question:
SnapshotDirectory { public FileStatus[] listStatus() throws IOException { return fileSystem.listStatus(directory); } private  SnapshotDirectory(@Nonnull Path directory, @Nonnull FileSystem fileSystem); private  SnapshotDirectory(@Nonnull Path directory); @Nonnull Path getDirectory(); boolean mkdirs(); @Nonnull FileSystem getFileSystem(); boolean exists(); FileStatus[] listStatus(); boolean cleanup(); boolean isSnapshotCompleted(); @Nullable abstract DirectoryStateHandle completeSnapshotAndGetHandle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static SnapshotDirectory temporary(@Nonnull Path directory); static SnapshotDirectory permanent(@Nonnull Path directory);  }### Answer:
@Test public void listStatus() throws Exception { File folderRoot = temporaryFolder.getRoot(); File folderA = new File(folderRoot, String.valueOf(UUID.randomUUID())); File folderB = new File(folderA, String.valueOf(UUID.randomUUID())); Assert.assertTrue(folderB.mkdirs()); File file = new File(folderA, "test.txt"); Assert.assertTrue(file.createNewFile()); Path path = new Path(folderA.toURI()); FileSystem fileSystem = path.getFileSystem(); SnapshotDirectory snapshotDirectory = SnapshotDirectory.permanent(path); Assert.assertTrue(snapshotDirectory.exists()); Assert.assertEquals( Arrays.toString(fileSystem.listStatus(path)), Arrays.toString(snapshotDirectory.listStatus())); }