### Question:
DscManualUploadDateTimestampFilePicker implements MostRecentFilePicker { @Override public File getMostRecentSourceFile() { String[] uploadFilenames = uploadsDir.list(getFilenameFilter()); if (uploadFilenames.length == 0) return null; Arrays.sort(uploadFilenames, new timestampAfterPrefixFilenameComparator()); String latestFilename = uploadFilenames[(uploadFilenames.length - 1)]; return new File(uploadsDir, latestFilename); } DscManualUploadDateTimestampFilePicker(String timestampedUploadsDir); @Override File getMostRecentSourceFile();  }### Answer:
@Test public void testGetMostRecentSourceFile() throws Exception { String simpleFileName = tmpDir.getAbsoluteFile() + File.separator + "dsc.csv"; File expectedFile = new File(simpleFileName); FileUtils.writeStringToFile(expectedFile, "data"); assertTrue(expectedFile.exists()); File actualFile = picker.getMostRecentSourceFile(); assertNull(actualFile); String suffixFilename = tmpDir.getAbsoluteFile() + File.separator + "dsc_20130319.csv"; expectedFile = new File(suffixFilename); FileUtils.writeStringToFile(expectedFile, "data"); assertTrue(expectedFile.exists()); actualFile = picker.getMostRecentSourceFile(); assertEquals(expectedFile, actualFile); suffixFilename = tmpDir.getAbsoluteFile() + File.separator + "dsc_20130320.csv"; expectedFile = new File(suffixFilename); FileUtils.writeStringToFile(expectedFile, "data"); assertTrue(expectedFile.exists()); actualFile = picker.getMostRecentSourceFile(); assertEquals(expectedFile, actualFile); suffixFilename = tmpDir.getAbsoluteFile() + File.separator + "dsc_20130318.csv"; File notExpectedFile = new File(suffixFilename); FileUtils.writeStringToFile(notExpectedFile, "data"); assertTrue(notExpectedFile.exists()); actualFile = picker.getMostRecentSourceFile(); assertEquals(expectedFile, actualFile); }