public static <
                    X,
                    P extends MessageQueryParameter<X>,
                    R extends RequestBody,
                    M extends MessageParameters>
            X getQueryParameter(final HandlerRequest<R> request, final Class<P> queryParameterClass)
                    throws RestHandlerException {

        return getQueryParameter(request, queryParameterClass, null);
    }
@Test
    void testGetQueryParameterDefaultValue() throws Exception {
        final Boolean allowNonRestoredState =
                HandlerRequestUtils.getQueryParameter(
                        HandlerRequest.resolveParametersAndCreate(
                                EmptyRequestBody.getInstance(),
                                new TestMessageParameters(),
                                Collections.emptyMap(),
                                Collections.singletonMap("key", Collections.emptyList()),
                                Collections.emptyList()),
                        TestBooleanQueryParameter.class,
                        true);
        assertThat(allowNonRestoredState).isTrue();
    }