ParameterExtractor implements HasKeys<String> { @Override public Enumeration<String> getKeys() { return request.getParameterNames(); } ParameterExtractor(PortletRequest request); @Override Enumeration<String> getKeys(); @Override String getValue(String key);  }
@SuppressWarnings("unchecked") @Test public void testGetKeys() { Enumeration<String> keys = createMock(Enumeration.class); expect(request.getParameterNames()).andReturn(keys); replay(request, keys); assertEquals(keys, extractor.getKeys()); verify(request, keys); }