### Question:
DataDirHelper { public List<File> getSortedSnapshotList() { List<File> files = new ArrayList<>(); for(File f : snapshotDir.listFiles(snapFilter)){ files.add(f); } sort(files,comparator); return files; } DataDirHelper(File transactionLogDir, File snapshotDir); List<File> getSortedSnapshotList(); List<File> getSortedLogList();  }### Answer:
@Test public void getSortedSnapshotListTest(){ DataDirHelper helper = new DataDirHelper(dataDir,dataDir); List<File> sortedSnapshotList = helper.getSortedSnapshotList(); assertEquals(5,sortedSnapshotList.size()); assertEquals(5,sortedSnapshotList.size()); assertTrue(sortedSnapshotList.get(0).getName().contentEquals("snapshot.0")); assertTrue(sortedSnapshotList.get(1).getName().contentEquals("snapshot.44")); assertTrue(sortedSnapshotList.get(2).getName().contentEquals("snapshot.86")); assertTrue(sortedSnapshotList.get(3).getName().contentEquals("snapshot.b4")); assertTrue(sortedSnapshotList.get(4).getName().contentEquals("snapshot.e7")); }