@Test
void validateResponseWithErrorResponse() {

    var response = new ErrorResponse();
    response.id = "id";
    response.severity = "WARN";
    response.errorCode = "NOT_FOUND";
    response.message = "not found";
    assertThatThrownBy(() -> webServiceClient.validateResponse(new HTTPResponse(404, Map.of(), Strings.bytes(JSON.toJSON(response)))))
            .isInstanceOf(RemoteServiceException.class)
            .satisfies(throwable -> {
                RemoteServiceException exception = (RemoteServiceException) throwable;
                assertThat(exception.severity()).isEqualTo(Severity.WARN);
                assertThat(exception.errorCode()).isEqualTo(response.errorCode);
                assertThat(exception.getMessage()).isEqualTo(response.message);
                assertThat(exception.status).isEqualTo(HTTPStatus.NOT_FOUND);
            });
}