@Test
public void writesBody() throws Exception {

    TstServletOutputStream output = new TstServletOutputStream();
    when(httpServletResponse.getOutputStream()).thenReturn(output);
    when(containerResponse.getEntity()).thenReturn("hello world");
    when(containerResponse.getHttpHeaders()).thenReturn(new MultivaluedHashMap<>());
    servletContainerResponseWriter.writeBody(containerResponse, new StringEntityProvider());
    assertArrayEquals("hello world".getBytes(), output.getData());
}