Map<String, Object> attrs = new HashMap<String, Object>();
attrs.put("key", "value");
OutgoingSessionGranularitySessionData sessionData = new MockOutgoingSessionData(id, 0, ts, md, attrs);
testee.storeSessionData(sessionData);
IncomingDistributableSessionData incoming = testee.getSessionData(id, true);
assertEquals(0, incoming.getVersion());
assertEquals(md.getCreationTime() + 1, incoming.getTimestamp());
assertEquals(md.getId(), incoming.getMetadata().getId());
assertEquals(md.getCreationTime(), incoming.getMetadata().getCreationTime());
assertEquals(md.isNew(), incoming.getMetadata().isNew());
assertEquals(md.isValid(), incoming.getMetadata().isValid());
assertEquals(md.getMaxInactiveInterval(), incoming.getMetadata().getMaxInactiveInterval());
assertTrue(incoming.providesSessionAttributes());
assertEquals(attrs, incoming.getSessionAttributes());
incoming = testee.getSessionData(id, false);
assertEquals(0, incoming.getVersion());
assertEquals(md.getCreationTime() + 1, incoming.getTimestamp());
assertEquals(md.getId(), incoming.getMetadata().getId());
assertEquals(md.getCreationTime(), incoming.getMetadata().getCreationTime());
assertEquals(md.isNew(), incoming.getMetadata().isNew());
assertEquals(md.isValid(), incoming.getMetadata().isValid());
assertEquals(md.getMaxInactiveInterval(), incoming.getMetadata().getMaxInactiveInterval());
assertFalse(incoming.providesSessionAttributes());
}