NamespaceRegistryFacade implements NamespaceRegistry { @Override public void registerNamespace(String prefix, String uri) throws RepositoryException { throw new ListenerReadOnlyException(); } @SuppressWarnings("WeakerAccess")  NamespaceRegistryFacade(@NotNull NamespaceRegistry delegate); @Override String[] getPrefixes(); @Override String[] getURIs(); @Override String getURI(String prefix); @Override String getPrefix(String uri); @Override void registerNamespace(String prefix, String uri); @Override void unregisterNamespace(String prefix);  }
@Test(expected = ListenerReadOnlyException.class) public void testRORegisterNamespace() throws Exception { NamespaceRegistryFacade facade = getFacade(mock(NamespaceRegistry.class)); facade.registerNamespace("", ""); }