JackrabbitSessionFacade extends SessionFacade<JackrabbitSession> implements JackrabbitSession { @Override public Node getNodeOrNull(final String absPath) throws RepositoryException { Node internal = delegate.getNodeOrNull(absPath); if (internal != null) { return NodeFacade.wrap(internal, this); } return null; } @SuppressWarnings("WeakerAccess")  JackrabbitSessionFacade(final @NotNull JackrabbitSession delegate, final boolean notProtected); @Override boolean hasPermission(final @NotNull String absPath, final @NotNull String... actions); @Override PrincipalManager getPrincipalManager(); @Override UserManager getUserManager(); @Override Item getItemOrNull(final String absPath); @Override Property getPropertyOrNull(final String absPath); @Override Node getNodeOrNull(final String absPath);  }
@Test public void testGetNodeOrNull() throws Exception { inspectForTest(session -> { final JackrabbitSessionFacade facade = new JackrabbitSessionFacade(session, true); assertTrue("root node should be same as /", facade.getRootNode().isSame(facade.getNodeOrNull("/"))); assertNull("/foo node should be null", facade.getNodeOrNull("/foo")); }); }