@Test
public void testWriteShouldNotAppendBodyWhenItIsNull() throws IOException {

    //GIVEN
    doReturn(OUTPUT_FILE).when(underTest).getOutputFileName(MESSAGE_LOGGER_ID, true);
    given(bufferedWriterFactory.createBufferedWriter(OUTPUT_FILE, OUTPUT_BUFFER_SIZE)).willReturn(bufferedWriter);
    given(request.getBody()).willReturn(null);
    given(request.getWilmaMessageLoggerId()).willReturn(MESSAGE_LOGGER_ID);
    given(request.getRequestLine()).willReturn(REQUEST_LINE);
    given(request.getRemoteAddr()).willReturn(REMOTE_ADDR);
    //WHEN
    underTest.write(request, true);
    //THEN
    verify(bufferedWriter, never()).append(null);
}