RetentionManagerFacade implements RetentionManager { @Override public RetentionPolicy getRetentionPolicy(String absPath) throws RepositoryException { return delegate.getRetentionPolicy(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 testGetRetentionPolicy() throws Exception { RetentionManager delegate = mock(RetentionManager.class); RetentionManagerFacade facade = getFacade(delegate); final String path = "/correct/path"; final RetentionPolicy value = mock(RetentionPolicy.class); when(delegate.getRetentionPolicy(path)).thenReturn(value); assertSame("same value", value, facade.getRetentionPolicy(path)); }