### Question:
SimplePatchScanner implements PatchScanner { public List<Patch> scan(File baseDir, String[] paths) throws DuplicatePatchNameException, IOException { List<DirMask> dirMasks = parsePatchDirs(baseDir, paths); LinkedList<Patch> list = new LinkedList<Patch>(); for (DirMask dm : dirMasks) { log.debug("Scan for patches " + dm.getDir().getAbsolutePath() + " with " + dm.getMask()); LinkedList<Patch> dirList = new LinkedList<Patch>(); notADirectoryCheck(dm.getDir()); File[] fList = dm.getDir().listFiles(new WildcardMaskFileFilter(dm.getMask())); if (fList != null) { for (File f : fList) { Patch p = new Patch(); p.setFile(f); p.setName(AbstractPatch.normalizeName(f.getName())); dirList.add(p); } } sortDirectory(dirList); for (Patch patch1 : dirList) { for (Patch patch2 : list) { if (patch1.getName().equals(patch2.getName())) { throw new DuplicatePatchNameException(this, patch1, patch2); } } list.add(patch1); } } sortAll(list); return list; }  List<Patch> scan(File baseDir, String[] paths); File findRollbackFile(File baseDir, String[] paths, Patch patch);  }### Answer:
@Test public void testScan() throws Exception { File dir = new File(".").getCanonicalFile(); if (dir.getAbsolutePath().endsWith("dbpatch-core")) { dir = dir.getParentFile(); } List<Patch> result = simplePatchScanner.scan(dir, new String[]{"*.md"}); File f = result.get(0).getFile(); assertTrue(f.getAbsolutePath().endsWith(".md")); }