Description
RequestUtils.decodeParameters(String, ValueMap) fills a (Value)Map with values of type java.lang.String while it
has to fill values of type String[] because by Servlet API java.servlet.ServletRequest.getParameterValues(String) returns String[].
How I get to this:
mockHttpServletRequest.setUrl("http://dummy.com?param1=value1") -> this calls RequestUtils.decodeParameters(queryString, parameters);
Later when I do mockHttpServletRequest.getParameterMap() and iterate over it I expect the values to be of type String[].
A trivial (and wrong) fix would be to put "new String[]
{currentValue}" in the map. The proper fix is to collect all values per parameter name and create an array of them.