@Test
public void testGetLogContentWhenErrorOccursShouldReturnErrorMessage() throws IOException {

    //GIVEN
    Collection<File> files = new ArrayList<>();
    String fileName = "a";
    File file = new File("a");
    files.add(file);
    given(fileUtils.getFilesWithExtension(LOG_PATH, LOG_EXTENSION)).willReturn(files);
    given(fileUtils.readFileToString(file)).willThrow(new IOException());
    //WHEN
    String result = underTest.getLogContent(fileName);
    //THEN
    assertEquals(ERROR_MESSAGE, result);
}