### Question:
RequestAdapter extends HttpServletRequestWrapper { @Override public Map<String, String[]> getParameterMap() { Map<String, String[]> parameters = new HashMap<>(); for (Map.Entry<String, List<String>> entry : req.getForm().entrySet()) { List<String> values = entry.getValue(); parameters.put(entry.getKey(), values.toArray(new String[values.size()])); } return Collections.unmodifiableMap(parameters); } RequestAdapter(final HttpServletRequest request, final Request req); @Override String getParameter(final String name); @Override Map<String, String[]> getParameterMap(); @Override Enumeration<String> getParameterNames(); @Override String[] getParameterValues(final String name);  }### Answer:
@Test(dataProvider = "requestsWithFormParameters") public void testGetParameterMap(final Request request) throws Exception { RequestAdapter adapter = new RequestAdapter(delegate, request); final Map<String, String[]> params = adapter.getParameterMap(); assertThat(params) .hasSize(2) .containsEntry("hello", array("world")) .containsEntry("multi_valued", array("one", "two three")); }