### Question:
FSCheckpointManager implements CheckpointStore { @Override public List<String> listFiles(String filePath) throws IOException { String[] files = getFullyQualifiedPath(filePath).list(); if (null == files) { return Collections.emptyList(); } return Lists.newArrayList(files); } FSCheckpointManager(File rootPath); @Override List<String> listFiles(String filePath); @Override boolean fileExists(String filePath); @Override long getFileLength(String filePath); @Override InputStream openInputStream(String filePath); @Override OutputStream openOutputStream(String filePath); @Override void rename(String srcPath, String destPath); @Override void deleteRecursively(String srcPath); @Override void delete(String srcPath); @Override void createDirectories(String srcPath); @Override void close();  }### Answer:
@Test public void testListFilesEmpty() throws Exception { new File(rootDir, runtime.getMethodName()).mkdir(); assertTrue(cm.listFiles(runtime.getMethodName()).isEmpty()); }
@Test public void testListFilesNotFound() throws Exception { assertTrue(cm.listFiles(runtime.getMethodName()).isEmpty()); }
@Test public void testListFiles() throws Exception { int numFiles = 3; List<String> expectedFiles = Lists.newArrayListWithExpectedSize(3); File testDir = new File(rootDir, runtime.getMethodName()); testDir.mkdir(); for (int i = 0; i < numFiles; ++i) { String filename = runtime.getMethodName() + "-" + i; expectedFiles.add(filename); new File(testDir, filename).mkdir(); } List<String> files = cm.listFiles(runtime.getMethodName()); Collections.sort(files); assertEquals(expectedFiles, files); }