RequestScopeExtractor implements AttributeExtractor { @Override public Object getValue(String key) { return request.getAttribute(key); } RequestScopeExtractor(PortletRequest request); @Override void setValue(String name, Object value); @Override void removeValue(String name); @Override Enumeration<String> getKeys(); @Override Object getValue(String key);  }
@Test public void testGetValue() { expect(request.getAttribute("name")).andReturn("value"); replay(request); assertEquals("value", extractor.getValue("name")); verify(request); }