protected Map<String, String[]> generateParameterMap(MultiValuedTreeMap<String, String> qs, ContainerConfig config) {
        Map<String, String[]> output;

        Map<String, List<String>> formEncodedParams = getFormUrlEncodedParametersMap();

        if (qs == null) {
            // Just transform the List<String> values to String[]
            output = formEncodedParams.entrySet().stream()
                .collect(Collectors.toMap(Map.Entry::getKey, (e) -> e.getValue().toArray(new String[0])));
        } else {
            Map<String, List<String>> queryStringParams;
            if (config.isQueryStringCaseSensitive()) {
                queryStringParams = qs;
            } else {
                // If it's case insensitive, we check the entire map on every parameter
                queryStringParams = qs.entrySet().stream().parallel().collect(
                    Collectors.toMap(
                        Map.Entry::getKey,
                        e -> getQueryParamValuesAsList(qs, e.getKey(), false)
                    ));
            }

            // Merge formEncodedParams and queryStringParams Maps
            output = Stream.of(formEncodedParams, queryStringParams).flatMap(m -> m.entrySet().stream())
                .collect(
                    Collectors.toMap(
                        Map.Entry::getKey,
                        e -> e.getValue().toArray(new String[0]),
                        // If a parameter is in both Maps, we merge the list of values (and ultimately transform to String[])
                        (formParam, queryParam) -> Stream.of(formParam, queryParam).flatMap(Stream::of).toArray(String[]::new)
                    ));

        }

        return output;
    }
@Test
    void parameterMapWithEncodedParams_generateParameterMap_validQuery() {
        AwsProxyHttpServletRequest request = new AwsProxyHttpServletRequest(encodedQueryString, mockContext, null, config);

        Map<String, String[]> paramMap = null;
        try {
            paramMap = request.generateParameterMap(request.getAwsProxyRequest().getMultiValueQueryStringParameters(), config);
        } catch (Exception e) {
            e.printStackTrace();
            fail("Could not generate parameter map");
        }

        assertArrayEquals(new String[]{"two"}, paramMap.get("one"));
        assertArrayEquals(new String[]{"{\"name\":\"faisal\"}"}, paramMap.get("json"));
        assertTrue(paramMap.size() == 2);
    }