Object value = session.getAttribute(KEY);
assertSame(VALUE, value);
}
public void testSetGlobalSessionScopedAttributeAfterCompletion() throws Exception {
MockPortletSession session = new MockPortletSession();
session.setAttribute(KEY, VALUE);
MockPortletRequest request = new MockPortletRequest();
request.setSession(session);
PortletRequestAttributes attrs = new PortletRequestAttributes(request);
attrs.requestCompleted();
request.close();
attrs.setAttribute(KEY, VALUE, RequestAttributes.SCOPE_GLOBAL_SESSION);
Object value = session.getAttribute(KEY);
assertSame(VALUE, value);
}