LockManagerFacade implements LockManager { @Override public void unlock(String absPath) throws RepositoryException { throw new ListenerReadOnlyException(); } LockManagerFacade(final @NotNull LockManager delegate, final @NotNull SessionFacade<S> session); @Override Lock getLock(String absPath); @Override String[] getLockTokens(); @Override boolean holdsLock(String absPath); @Override boolean isLocked(String absPath); @Override void addLockToken(String lockToken); @Override Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo); @Override void removeLockToken(String lockToken); @Override void unlock(String absPath);  }
@Test(expected = ListenerReadOnlyException.class) public void testROUnlock() throws Exception { LockManagerFacade<Session> facade = getFacade(mock(LockManager.class)); facade.unlock(""); }