public static void sendMessageResponse(ResponseHandler handler, List<Cookie> cookies, int code, String message) {
        Response response = createResponse(code, cookies);
        ContentChannel contentChannel = handler.handleResponse(response);
        try {
            var mapper = Jackson.mapper();
            ObjectNode jsonNode = mapper.createObjectNode();
            jsonNode.set("message", TextNode.valueOf(message));
            byte[] jsonBytes = mapper.writerWithDefaultPrettyPrinter().writeValueAsBytes(jsonNode);
            contentChannel.write(ByteBuffer.wrap(jsonBytes), null);
        } catch (JsonProcessingException e) {
            throw new UncheckedIOException(e);
        }
        contentChannel.close(null);
    }
@Test
    void message_response() {
        RequestHandlerTestDriver.MockResponseHandler responseHandler = new RequestHandlerTestDriver.MockResponseHandler();

        sendMessageResponse(responseHandler, List.of(), 404, "Not found");
        assertEquals(404, responseHandler.getStatus());
        assertHeaders(responseHandler.getResponse());
        assertEquals("{\n  \"message\" : \"Not found\"\n}", responseHandler.readAll());
    }