@Test
public final void testWriteFileContentToResponseShouldSendFileContentWhenTheSourceParameterIsTrue() throws IOException {

    // GIVEN
    given(messageFileReader.readFile("filename", path)).willReturn(fileInputStream);
    given(request.getParameter("source")).willReturn("true");
    given(request.getHeader("User-Agent")).willReturn("windows");
    // WHEN
    underTest.writeFileContentToResponse(request, response, "/filename", path);
    // THEN
    verify(response).setContentType("text/plain");
    verify(printWriter).write(FILE_CONTENT);
    verify(printWriter).flush();
    verify(printWriter).close();
}