@Test
void failedToReadBody() {

    var request = new RequestImpl(null, null);
    var exchange = new HttpServerExchange(null);
    exchange.putAttachment(RequestBodyReader.REQUEST_BODY, new RequestBodyReader.RequestBody(null, new IOException()));
    assertThatThrownBy(() -> parser.parseBody(request, exchange))
            .isInstanceOf(BadRequestException.class)
            .satisfies(e -> assertThat(((ErrorCode) e).errorCode()).isEqualTo("FAILED_TO_READ_HTTP_REQUEST"));
}