NodeTypeManagerFacade implements NodeTypeManager { @Override public PropertyDefinitionTemplate createPropertyDefinitionTemplate() throws RepositoryException { return delegate.createPropertyDefinitionTemplate(); } 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 public void testCreatePropertyDefinitionTemplate() throws Exception { NodeTypeManager delegate = mock(NodeTypeManager.class); NodeTypeManagerFacade facade = getFacade(delegate); final PropertyDefinitionTemplate value = mock(PropertyDefinitionTemplate.class); when(delegate.createPropertyDefinitionTemplate()).thenReturn(value); assertSame("same value", value, facade.createPropertyDefinitionTemplate()); }