@Override public SlingRepository newSlingRepository() { Repository repository = MockJcr.newRepository(); return new MockSlingRepository(repository); }
/** * Create a new mocked in-memory JCR session. It contains only the root node. * All data of the session is thrown away if it gets garbage collected. * @return JCR session */ public static Session newSession() { try { return newRepository().login(); } catch (RepositoryException ex) { throw new RuntimeException("Creating mocked JCR session failed.", ex); } }