### Question:
ImageFileNameFilter implements FilenameFilter { @Override public boolean accept(File directory, String fileName) { return fileName.endsWith(FileSystemTileCache.FILE_EXTENSION); } private  ImageFileNameFilter(); @Override boolean accept(File directory, String fileName);  }### Answer:
@Test public void acceptTest() { FilenameFilter filenameFilter = ImageFileNameFilter.INSTANCE; Assert.assertFalse(filenameFilter.accept(null, "preferences.bar")); Assert.assertTrue(filenameFilter.accept(null, "preferences" + FileSystemTileCache.FILE_EXTENSION)); }