@Test
public final void testWriteFileNamesToResponseShouldWriteFileNames() throws IOException {

    // GIVEN
    given(path.toFile()).willReturn(file);
    given(messageFileListJsonBuilder.buildLogFileListJson(file)).willReturn("files");
    given(request.getHeader("User-Agent")).willReturn("windows");
    // WHEN
    underTest.writeFileNamesToResponse(response, path);
    // THEN
    verify(response).setContentType("application/json");
    verify(printWriter).write("files");
    verify(printWriter).flush();
    verify(printWriter).close();
}