### Question:
JcrNodeTypeManager implements NodeTypeManager { public boolean hasNodeType( String nodeTypeName ) { Name ntName = context().getValueFactories().getNameFactory().create(nodeTypeName); return repositoryTypeManager.hasNodeType(ntName); } JcrNodeTypeManager( JcrSession session,
                        RepositoryNodeTypeManager repositoryTypeManager ); NodeTypeIterator getAllNodeTypes(); NodeTypeIterator getMixinNodeTypes(); JcrNodeType getNodeType( String nodeTypeName ); boolean hasNodeType( String nodeTypeName ); NodeTypeIterator getPrimaryNodeTypes(); NodeType registerNodeType( NodeTypeDefinition template,
                                      boolean allowUpdate ); NodeTypeIterator registerNodeTypes( Collection<NodeTypeDefinition> templates,
                                               boolean allowUpdates ); NodeTypeIterator registerNodeTypes( Iterable<NodeTypeDefinition> nodeTypes ); NodeTypeIterator registerNodeTypes( NodeTypeDefinition[] ntds,
                                               boolean allowUpdate ); void unregisterNodeType( String nodeTypeName ); void unregisterNodeTypes( Collection<String> nodeTypeNames ); void unregisterNodeTypes( String[] names ); NodeTypeTemplate createNodeTypeTemplate(); @SuppressWarnings( "unchecked" ) NodeTypeTemplate createNodeTypeTemplate( NodeTypeDefinition ntd ); NodeDefinitionTemplate createNodeDefinitionTemplate(); PropertyDefinitionTemplate createPropertyDefinitionTemplate(); boolean isDerivedFrom( String[] testTypeNames,
                                  String primaryTypeName,
                                  String[] mixinNames );  }### Answer:
@Test public void shouldReturnTrueForHasNodeTypeWithExistingNodeTypeName() throws Exception { assertTrue(nodeTypeMgr.hasNodeType("nt:base")); assertTrue(nodeTypeMgr.hasNodeType(HIERARCHY_NODE_TYPE)); assertTrue(nodeTypeMgr.hasNodeType(MIXIN1)); }
@Test public void shouldReturnFalseForHasNodeTypeWithNonexistantNodeTypeName() throws Exception { assertFalse(nodeTypeMgr.hasNodeType("someArgleBargle")); assertFalse(nodeTypeMgr.hasNodeType(HIERARCHY_NODE_TYPE + "x")); }