When I run test against a Controller with @PutMapping and a parameter with custom type, say
I'll get unexpected result that I got d1="a,a", d2="s,s".
But a normal PUT request works fine.
With some digging, I noticed that the first line of HttpPutFormContentFilter#getParameterValues(String)
returns null when requested normally but return the values in form data under test environment(when the request is of type MockHttpServletRequest).
I wrote a little spring boot project to demonstrate it. And there is some screenshot shows the difference between a real request and a mocked request.