@Test
public void writesStatusAndHeaders() throws Exception {

    MultivaluedMap<String, Object> responseHeaders = new MultivaluedHashMap<>();
    responseHeaders.putSingle("content-type", "text/plain");
    when(containerResponse.getStatus()).thenReturn(200);
    when(containerResponse.getHttpHeaders()).thenReturn(responseHeaders);
    servletContainerResponseWriter.writeHeaders(containerResponse);
    verify(httpServletResponse).setStatus(eq(200));
    verify(httpServletResponse).addHeader(eq("content-type"), eq("text/plain"));
}