NodeTypeManagerFacade implements NodeTypeManager { @Override public NodeType registerNodeType(NodeTypeDefinition ntd, boolean allowUpdate) throws RepositoryException { throw new ListenerReadOnlyException(); } NodeTypeManagerFacade(final @NotNull NodeTypeManager delegate); @Override NodeType getNodeType(String nodeTypeName); @Override boolean hasNodeType(String name); @Override NodeTypeIterator getAllNodeTypes(); @Override NodeTypeIterator getPrimaryNodeTypes(); @Override NodeTypeIterator getMixinNodeTypes(); @Override NodeTypeTemplate createNodeTypeTemplate(); @Override NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd); @Override NodeDefinitionTemplate createNodeDefinitionTemplate(); @Override PropertyDefinitionTemplate createPropertyDefinitionTemplate(); @Override NodeType registerNodeType(NodeTypeDefinition ntd, boolean allowUpdate); @Override NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] ntds, boolean allowUpdate); @Override void unregisterNodeType(String name); @Override void unregisterNodeTypes(String[] names);  }
@Test(expected = ListenerReadOnlyException.class) public void testRORegisterNodeType() throws Exception { NodeTypeManagerFacade facade = getFacade(mock(NodeTypeManager.class)); facade.registerNodeType(null, true); }