public static Map<String, String[]> getQueryMap(String query) {

        Map<String, String[]> map = new HashMap<>();
        String[] params = query.split(PARAM_CONCATENATE);
        for (String param : params) {
            String[] paramSplit = param.split("=");
            if (paramSplit.length == 0) {
                continue; // We found no key-/value-pair, so continue on the next param
            }
            String name = decodeQuery(paramSplit[0]);

            // hack for SOAP request (generally)
            if (name.trim().startsWith("<?")) { // $NON-NLS-1$
                map.put(" ", new String[] {query}); //blank name // $NON-NLS-1$
                return map;
            }

            // the post payload is not key=value
            if((param.startsWith("=") && paramSplit.length == 1) || paramSplit.length > 2) {
                map.put(" ", new String[] {query}); //blank name // $NON-NLS-1$
                return map;
            }

            String value = "";
            if(paramSplit.length>1) {
                value = decodeQuery(paramSplit[1]);
            }

            String[] known = map.get(name);
            if(known == null) {
                known = new String[] {value};
            }
            else {
                String[] tmp = new String[known.length+1];
                tmp[tmp.length-1] = value;
                System.arraycopy(known, 0, tmp, 0, known.length);
                known = tmp;
            }
            map.put(name, known);
        }
        return map;
    }
@Test
    void testGetQueryMapBug52491() {
        String query = "<envelope><header><context><conversationId>119</conversationId></context></header>"
                + "<body><call component=\"OrderTransfer\" method=\"getSourceManifestID\" id=\"2\">\n"
                + "<params></params><refs></refs></call></body></envelope>";
        Map<String, String[]> params = RequestViewHTTP.getQueryMap(query);

        Assertions.assertNotNull(params);
        Assertions.assertEquals(1, params.size());

        Map.Entry<String, String[]> param1 = params.entrySet().iterator().next();
        Assertions.assertNotNull(param1);
        Assertions.assertEquals(1, param1.getValue().length);
        Assertions.assertEquals(query, param1.getValue()[0]);
        Assertions.assertTrue(StringUtils.isBlank(param1.getKey()));
    }