### Question:
BasicGlobalExceptionHandler { protected List<String> getParameterInfos(HttpServletRequest req) { final List<String> result = new ArrayList<String>(); @SuppressWarnings("unchecked") final Map<String, String[]> parameters = req.getParameterMap(); if (parameters == null) { return result; } for (Entry<String, String[]> parameter : parameters.entrySet()) { result.add("Parameter " + parameter.getKey() + " = " + Arrays.toString(parameter.getValue())); } return result; } BasicGlobalExceptionHandler(String defaultErrorView);   }### Answer:
@Test public void testGetParameterInfos() { final Map<String, String[]> paramMap = new HashMap<String, String[]>(); paramMap.put("A", new String[] { "Value A" }); paramMap.put("B", new String[] { "Value B" }); when(requestMock.getParameterMap()).thenReturn(paramMap); final List<String> headerInfos = testee.getParameterInfos(requestMock); assertThat(headerInfos).hasSize(2).containsOnly( "Parameter A = [Value A]", "Parameter B = [Value B]"); }