@ExceptionHandler(FlagrException.class)
    public ResponseEntity<FlagrErrorResponse> handleFlagrException(FlagrException ex) {
        FlagrErrorResponse errorResponse = new FlagrErrorResponse(ex);
        return ResponseEntity.status(HttpResponseStatus.INTERNAL_SERVER_ERROR.getStatusCode())
                             .body(errorResponse);
    }
@Test
    void handleFlagrException() {
        final ResponseEntity<FlagrErrorResponse>
                result = flagrExceptionHandler.handleFlagrException(new FlagrException("flagr exception"));

        assertThat(result.getStatusCodeValue()).isEqualTo(500);
        assertThat(result.getBody())
                .extracting(FlagrErrorResponse::getStatus, FlagrErrorResponse::getMessage)
                .containsExactly(500, "flagr exception");
    }