RetentionManagerFacade implements RetentionManager { @Override public Hold[] getHolds(String absPath) throws RepositoryException { return delegate.getHolds(absPath); } RetentionManagerFacade(final @NotNull RetentionManager delegate); @Override Hold[] getHolds(String absPath); @Override RetentionPolicy getRetentionPolicy(String absPath); @Override Hold addHold(String absPath, String name, boolean isDeep); @Override void removeHold(String absPath, Hold hold); @Override void setRetentionPolicy(String absPath, RetentionPolicy retentionPolicy); @Override void removeRetentionPolicy(String absPath);  }
@Test public void testGetHolds() throws Exception { RetentionManager delegate = mock(RetentionManager.class); RetentionManagerFacade facade = getFacade(delegate); final String path = "/correct/path"; final Hold[] value = new Hold[0]; when(delegate.getHolds(path)).thenReturn(value); assertSame("same value", value, facade.getHolds(path)); }