RetentionManagerFacade implements RetentionManager { @Override public void removeRetentionPolicy(String absPath) throws RepositoryException { throw new ListenerReadOnlyException(); } 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(expected = ListenerReadOnlyException.class) public void testRORemoveRetentionPolicy() throws Exception { RetentionManagerFacade facade = getFacade(mock(RetentionManager.class)); facade.removeRetentionPolicy(""); }