@Test
public void testDirectoriesAreNotListed() throws Exception {

  new File(tmpDir, "outerFile").createNewFile();
  new File(tmpDir, "recursiveDir").mkdir();
  new File(tmpDir + File.separator + "recursiveDir", "innerFile").createNewFile();
  TaildirMatcher tm = new TaildirMatcher("f1", tmpDir.getAbsolutePath() + File.separator + ".*",
                                         isCachingNeeded);
  List<String> files = filesToNames(tm.getMatchingFiles());
  assertEquals(msgSubDirs, 1, files.size());
  assertTrue(msgSubDirs, files.contains("outerFile"));
}