@Test
public void dirty_persisted_object_is_forced_to_update()
{
HttpSession hs = mockHttpSession();
HttpServletRequest hsr = mockHttpServletRequest();
SessionPersistedObjectAnalyzer analyzer = newMock(SessionPersistedObjectAnalyzer.class);
Object dirty = new Object();
train_getAttribute(hs, "dirty", dirty);
replay();
Session session = new ClusteredSessionImpl(hsr, hs, analyzer);
assertSame(session.getAttribute("dirty"), dirty);
verify();
expect(analyzer.checkAndResetDirtyState(dirty)).andReturn(true);
train_getSession(hsr, false, hs);
hs.setAttribute("dirty", dirty);