@Test public void testIndexFolderWhenFolderEmptyShouldDoNothing() { given(folder2.canRead()).willReturn(true); given(folder2.isDirectory()).willReturn(true); given(folder2.list()).willReturn(null); underTest.indexFolder(folder2); verify(fileIndexer, never()).indexFile(file); }
public void indexFolder(final File file) { if (file.canRead()) { if (file.isDirectory()) { processFolder(file); } else { fileIndexer.indexFile(file); } } }
FolderIndexer { public void indexFolder(final File file) { if (file.canRead()) { if (file.isDirectory()) { processFolder(file); } else { fileIndexer.indexFile(file); } } } }
FolderIndexer { public void indexFolder(final File file) { if (file.canRead()) { if (file.isDirectory()) { processFolder(file); } else { fileIndexer.indexFile(file); } } }  }
FolderIndexer { public void indexFolder(final File file) { if (file.canRead()) { if (file.isDirectory()) { processFolder(file); } else { fileIndexer.indexFile(file); } } }  void indexFolder(final File file); }
FolderIndexer { public void indexFolder(final File file) { if (file.canRead()) { if (file.isDirectory()) { processFolder(file); } else { fileIndexer.indexFile(file); } } }  void indexFolder(final File file);  }