LuceneIndexEngine { public void addFileToIndex(final String fileName) { File file = fileFactory.createFile(fileName); indexFolder(file); }  void createIndex(final String docsPath); void addFileToIndex(final String fileName);  }
@Test public void testAddFileToIndex() { given(fileFactory.createFile(FOLDER_PATH)).willReturn(file); underTest.addFileToIndex(FOLDER_PATH); verify(folderIndexer).indexFolder(file); }