public HttpResponse error(Throwable t) {
        data(500, ContentType.TEXT_PLAIN, stream -> t.printStackTrace(new PrintStream(stream)));
        return this;
    }
@Test
    void testError() throws IOException {
        httpResponse.error(new Exception());

        verify(httpExchange).sendResponseHeaders(500, 0);
        verify(outputStream, atLeastOnce()).write(any(), anyInt(), anyInt());
    }