@Test
void testSendError() throws Exception {

    TestHttpServletResponse wrapped = new TestHttpServletResponse(null);
    TestServletOutputStream outputStream = new TestServletOutputStream();
    wrapped.setOutputStream(outputStream);
    outputStream.setResponse(wrapped);
    HttpServletResponseWrapper wrapper = new HttpServletResponseWrapper(wrapped);
    wrapper.sendError(400);
    assertEquals(400, wrapper.getStatus());
}