@Test
void validateResponseWith410() {

    assertThatThrownBy(() -> webServiceClient.validateResponse(new HTTPResponse(HTTPStatus.GONE.code, Map.of(), Strings.bytes("{}"))))
            .isInstanceOf(RemoteServiceException.class)
            .satisfies(throwable -> {
                RemoteServiceException exception = (RemoteServiceException) throwable;
                assertThat(exception.severity()).isEqualTo(Severity.ERROR);
                assertThat(exception.errorCode()).isEqualTo("REMOTE_SERVICE_ERROR");
                assertThat(exception.getMessage()).isEqualTo("failed to call remote service, statusCode=410");
                assertThat(exception.status).isEqualTo(HTTPStatus.GONE);
            });
}