InitParameterExtractor implements HasKeys<String> { @Override public String getValue(String key) { return context.getInitParameter(key); } InitParameterExtractor(PortletContext context); @Override Enumeration<String> getKeys(); @Override String getValue(String key);  }
@Test public void testGetValue() { expect(context.getInitParameter("name")).andReturn("value"); replay(context); assertEquals("value", extractor.getValue("name")); verify(context); }