JackrabbitSessionFacade extends SessionFacade<JackrabbitSession> implements JackrabbitSession { @Override public Property getPropertyOrNull(final String absPath) throws RepositoryException { Property internal = delegate.getPropertyOrNull(absPath); if (internal != null) { return new PropertyFacade<>(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 testGetPropertyOrNull() throws Exception { inspectForTest(session -> { final JackrabbitSessionFacade facade = new JackrabbitSessionFacade(session, true); assertNull("property should be null", facade.getPropertyOrNull("/jcr:system/someProp")); final Node fooNode = session.getRootNode().addNode("foo", JcrConstants.NT_UNSTRUCTURED); fooNode.setProperty("someProp", "someVal"); assertEquals("someProp should have someVal value", "someVal", facade.getPropertyOrNull("/foo/someProp").getString()); }); }