@Test
public void testDeleteDocFromIndexShouldDeleteFileFromIndex() throws IOException {

    //GIVEN
    given(termFactory.createTerm(FIELD_NAME, TEXT)).willReturn(term);
    //WHEN
    underTest.deleteDocFromIndex(TEXT);
    //THEN
    verify(indexWriter).deleteDocuments(term);
}