JcrDaoSupport extends DaoSupport { public final void setSessionFactory(SessionFactory sessionFactory) { this.template = new JcrTemplate(sessionFactory); }  final void setSessionFactory(SessionFactory sessionFactory); final SessionFactory getSessionFactory(); final void setTemplate(JcrTemplate jcrTemplate); final JcrTemplate getTemplate();  }
@Test public void testSetSessionFactory() throws RepositoryException { replay(sessionFactory); replay(session); JcrDaoSupport dao = new JcrDaoSupport() { }; dao.setSessionFactory(sessionFactory); assertEquals(dao.getSessionFactory(), sessionFactory); }