### Question:
DLCheckpointStore implements CheckpointStore { @Override public List<String> listFiles(String filePath) throws IOException { return Lists.newArrayList(namespace.getLogs(filePath)); } DLCheckpointStore(Namespace namespace); @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 srcLog, String dstLog); @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 { namespace.createLog(runtime.getMethodName()); assertTrue(store.listFiles(runtime.getMethodName()).isEmpty()); }
@Test public void testListFilesNotFound() throws Exception { assertTrue(store.listFiles(runtime.getMethodName()).isEmpty()); }
@Test public void testListFiles() throws Exception { int numFiles = 3; List<String> expectedFiles = Lists.newArrayListWithExpectedSize(3); namespace.createLog(runtime.getMethodName()); for (int i = 0; i < numFiles; ++i) { String filename = runtime.getMethodName() + "-" + i; expectedFiles.add(filename); namespace.createLog(runtime.getMethodName() + "/" + filename); } List<String> files = store.listFiles(runtime.getMethodName()); Collections.sort(files); assertEquals(expectedFiles, files); }