ItemFacade implements Item { @Override public final String getPath() throws RepositoryException { return delegate.getPath(); } @SuppressWarnings("WeakerAccess")  ItemFacade(final @NotNull J delegate, final @NotNull SessionFacade<S> session); @SuppressWarnings("WeakerAccess") static @NotNull Item ensureBestWrapper(final @NotNull Item primaryItem, final @NotNull SessionFacade<?> session); @Override final String getPath(); @Override final String getName(); @Override final Item getAncestor(int depth); @Override final Node getParent(); @Override final int getDepth(); @Override final Session getSession(); @Override final boolean isNode(); @Override final boolean isNew(); @Override final boolean isModified(); @Override final boolean isSame(Item otherItem); @Override final void accept(ItemVisitor visitor); @Override final void refresh(boolean keepChanges); @Override final void save(); @Override final void remove();  }
@Test public void testGetPath() throws Exception { Item delegate = mock(Item.class); ItemFacade<Item, Session> facade = getFacade(delegate); final String value = "/correct/path"; when(delegate.getPath()).thenReturn(value); assertSame("same value", value, facade.getPath()); }