@Test public void testGetSession() throws RepositoryException { JcrDaoSupport dao = new JcrDaoSupport() { }; expect(sessionFactory.getSession()).andReturn(session); replay(sessionFactory); replay(session); dao.setSessionFactory(sessionFactory); dao.afterPropertiesSet(); try { dao.getSession(); fail("expected exception"); } catch (IllegalStateException e) { } assertEquals(dao.getSession(true), session); }
protected final Session getSession() { return getSession(this.template.isAllowCreate()); }
JcrDaoSupport extends DaoSupport { protected final Session getSession() { return getSession(this.template.isAllowCreate()); } }
JcrDaoSupport extends DaoSupport { protected final Session getSession() { return getSession(this.template.isAllowCreate()); }  }
JcrDaoSupport extends DaoSupport { protected final Session getSession() { return getSession(this.template.isAllowCreate()); }  final void setSessionFactory(SessionFactory sessionFactory); final SessionFactory getSessionFactory(); final void setTemplate(JcrTemplate jcrTemplate); final JcrTemplate getTemplate(); }
JcrDaoSupport extends DaoSupport { protected final Session getSession() { return getSession(this.template.isAllowCreate()); }  final void setSessionFactory(SessionFactory sessionFactory); final SessionFactory getSessionFactory(); final void setTemplate(JcrTemplate jcrTemplate); final JcrTemplate getTemplate();  }