### Question:
FileNasStorage implements RdfFileStorageSpi { private List<String> listFilesWithRegexs(String folderName, boolean all, String[] regexs) { List<String> paths = listFilesHandler(folderName, all); if (regexs == null || regexs.length == 0) { return paths; } List<String> result = new ArrayList<String>(); for (String filePath : paths) { String name = new File(filePath).getName(); for (String regex : regexs) { Pattern pattern = Pattern.compile(regex); if (pattern.matcher(name).matches()) { result.add(filePath); break; } } } return result; }  @Override void init(StorageConfig t); @Override InputStream getInputStream(String filename); @Override InputStream getInputStream(String filename, long start, long length); @Override InputStream getTailInputStream(FileConfig fileConfig); @Override void createNewFile(String filePath); @Override FileInfo getFileInfo(String filePath); @Override List<String> listFiles(String folderName, String[] regexs); @Override List<String> listFiles(String folderName, FilePathFilter... fileFilters); @Override List<String> listAllFiles(String folderName, String[] regexs); @Override List<String> listAllFiles(String folderName, FilePathFilter... fileFilters); @Override void download(String srcFile, String toFile); @Override void upload(String srcFile, String toFile, boolean override); @Override void rename(String srcFile, String toName); @Override void copy(String srcFile, String toFile); @Override void delete(String fullPath);  }### Answer:
@Test public void testListFilesWithRegexs() { List<String> paths = storage.listFiles(File.class.getResource("/storage").getPath(), new String[] { "folder1*" }); Assert.assertEquals(1, paths.size()); }