ParameterExtractor implements HasKeys<String> { @Override public String getValue(String key) { return request.getParameter(key); } ParameterExtractor(HttpServletRequest request); @SuppressWarnings("unchecked") @Override Enumeration<String> getKeys(); @Override String getValue(String key);  }
@Test public void testGetValue() { expect(request.getParameter("name")).andReturn("value"); replay(request); assertEquals("value", extractor.getValue("name")); verify(request); }