SessionScopeExtractor implements AttributeExtractor { @Override public void setValue(String name, Object value) { request.getPortletSession().setAttribute(name, value, scope); } SessionScopeExtractor(PortletRequest request, int scope); @Override void setValue(String name, Object value); @Override void removeValue(String name); @Override Enumeration<String> getKeys(); @Override Object getValue(String key);  }
@Test public void testSetValue() { expect(request.getPortletSession()).andReturn(session); session.setAttribute("name", "value", PortletSession.PORTLET_SCOPE); replay(request, session); extractor.setValue("name", "value"); verify(request, session); }