WorkspaceFacade implements Workspace { @Override public final void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) throws RepositoryException { throw new ListenerReadOnlyException(); } @SuppressWarnings("WeakerAccess")  WorkspaceFacade(final @NotNull W delegate, final @NotNull SessionFacade<S> session); @SuppressWarnings("WeakerAccess") static Workspace findBestWrapper(final @Nullable Workspace workspace,
                    final @NotNull SessionFacade<S> sessionFacade); @Override final Session getSession(); @Override final String getName(); @Override final String[] getAccessibleWorkspaceNames(); @Override final LockManager getLockManager(); @Override final QueryManager getQueryManager(); @Override final NamespaceRegistry getNamespaceRegistry(); @Override final NodeTypeManager getNodeTypeManager(); @Override final ObservationManager getObservationManager(); @Override final VersionManager getVersionManager(); @Override final void copy(String srcAbsPath, String destAbsPath); @Override final void copy(String srcWorkspace, String srcAbsPath, String destAbsPath); @Override final void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting); @Override final void move(String srcAbsPath, String destAbsPath); @Override final void restore(Version[] versions, boolean removeExisting); @Override final ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior); @Override final void importXML(String parentAbsPath, InputStream in, int uuidBehavior); @Override final void createWorkspace(String name); @Override final void createWorkspace(String name, String srcWorkspace); @Override final void deleteWorkspace(String name);  }
@Test(expected = ListenerReadOnlyException.class) public void testClone() throws RepositoryException { getFacade(mock(Workspace.class)).clone("", "", "", true); }