@Before
public final void initFactory() {
factory = new SessionModel.Factory() {
public SessionModel newInstance(String sessionID, long creationTime, long lastAccessedTime,
int maxInactiveInterval) {
SessionModel model = createMock(SessionModel.class);
expect(model.getSessionID()).andReturn(sessionID).anyTimes();
expect(model.getCreationTime()).andReturn(creationTime).anyTimes();
expect(model.getLastAccessedTime()).andReturn(lastAccessedTime).anyTimes();
expect(model.getMaxInactiveInterval()).andReturn(maxInactiveInterval).anyTimes();
replay(model);
return model;
}