@Test
public void testReleaseSession() {

    JcrDaoSupport dao = new JcrDaoSupport() {
    };
    dao.releaseSession(null);
    session.logout();
    replay(sessionFactory);
    replay(session);
    dao.setSessionFactory(sessionFactory);
    dao.afterPropertiesSet();
    dao.releaseSession(session);
}