@Test(expectedExceptions = SystemException.class)
public void testSearchForTextWhenCannotCreateIndexReadertShouldThrowException() throws IOException {

    //GIVEN
    given(readerFactory.create(true)).willThrow(new IOException());
    //WHEN
    underTest.searchForText(TEXT);
    //THEN it should throw exception
}