class QueryStringParser implements Parser<Map<String, String>> {

    @Override
    public Map<String, String> parse(final String queryString) throws MalformedInputException {
        Map<String, String> parameters = new HashMap<>();
        String[] queryParametersArray = queryString.split(PAIR_SEPARATOR);
        for (int i = 0; i < queryParametersArray.length; i++) {
            if (queryParametersArray[i].length() == 0) {
                continue;
            }

            String[] parameterPair = queryParametersArray[i].split(VALUE_SEPARATOR, 2);
            if (parameterPair[0].length() == 0) {
                continue;
            }

            if (parameterPair.length > 1) {
                parameters.put(parameterPair[0], StringUtilities.urlDecode(parameterPair[1]));
            }
        }

        return parameters;
    }

}