### Question:
SimplePatchScanner implements PatchScanner { List<DirMask> parsePatchDirs(File basePath, String[] dirs) throws IOException { List<DirMask> dirMasks = new LinkedList<DirMask>(); for (String s : dirs) { s = s.trim(); if (s.length() == 0) { log.debug(" - entry skipped"); continue; } File fch = new File(s); File f = fch.isAbsolute() ? fch : new File(basePath.getAbsoluteFile(), s); String absolute = f.getAbsolutePath(); if (!absolute.contains("*") && !absolute.contains("?")) { if (f.isDirectory()) { DirMask dm = new DirMask(f); dirMasks.add(dm); log.debug(" + entry directory " + dm); } else { DirMask dm = new DirMask(f.getParentFile()); dm.setMask(f.getName()); dirMasks.add(dm); log.debug(" + single file " + dm); } } else { String wch = f.getName(); DirMask dm = new DirMask(f.getParentFile().getCanonicalFile()); dm.setMask(wch); dirMasks.add(dm); log.debug(" + dir with special character " + dm); } } for (DirMask dm : dirMasks) { dm.validate(); } return dirMasks; }  List<Patch> scan(File baseDir, String[] paths); File findRollbackFile(File baseDir, String[] paths, Patch patch);  }### Answer:
@Test public void testParsePatchDirs() throws Exception { File dir = new File(".").getCanonicalFile(); List<DirMask> result = simplePatchScanner.parsePatchDirs(dir, new String[]{"*.txt"}); DirMask dm = result.get(0); assertEquals(dir, dm.getDir()); assertEquals("*.txt", dm.getMask()); }