SessionFactory sf = (SessionFactory) sfControl.getMock();
MockControl sessionControl = MockControl.createControl(Session.class);
Session session = (Session) sessionControl.getMock();
sfControl.expectAndReturn(sf.getSession(), session);
session.logout();
sessionControl.setVoidCallable(1);
sfControl.expectAndReturn(sf.getSessionHolder(session), new SessionHolder(session));
sfControl.replay();
sessionControl.replay();