{
Object stateObject = new Object();
StateObjectFactory factory = newFactory(stateObject);
MockControl control = newControl(WebSession.class);
WebSession session = (WebSession) control.getMock();
session.getAttribute("state:myapp:fred");
control.setReturnValue(null);
session.setAttribute("state:myapp:fred", stateObject);
WebRequest request = newRequest(session);
replayControls();