IndexDefinitionBuilder { public IndexDefinitionBuilder nodeTypeIndex() { tree.setProperty(FulltextIndexConstants.PROP_INDEX_NODE_TYPE, true); return this; } IndexDefinitionBuilder();  IndexDefinitionBuilder(NodeBuilder nodeBuilder);  IndexDefinitionBuilder(NodeBuilder nodeBuilder, boolean autoManageReindexFlag); IndexDefinitionBuilder evaluatePathRestrictions(); IndexDefinitionBuilder includedPaths(String... paths); IndexDefinitionBuilder excludedPaths(String... paths); IndexDefinitionBuilder queryPaths(String... paths); IndexDefinitionBuilder supersedes(String... paths); IndexDefinitionBuilder noAsync(); IndexDefinitionBuilder deprecated(); IndexDefinitionBuilder async(String... asyncVals); IndexDefinitionBuilder tags(String... tagVals); IndexDefinitionBuilder codec(String codecName); IndexDefinitionBuilder mergePolicy(String mergePolicy); IndexDefinitionBuilder addTags(String... additionalTagVals); IndexDefinitionBuilder nodeTypeIndex(); Tree getBuilderTree(); NodeState build(); Tree build(Tree tree); Node build(Node node); boolean isReindexRequired(); IndexRule indexRule(String type); boolean hasIndexRule(String type); AggregateRule aggregateRule(String type); AggregateRule aggregateRule(String primaryType, String... includes);  }
@Test public void nodeTypeIndex() throws Exception{ builder.nodeTypeIndex(); builder.indexRule("nt:file"); NodeState state = builder.build(); assertTrue(state.getChildNode("indexRules").exists()); NodeState ntFileRule = state.getChildNode("indexRules").getChildNode("nt:file"); assertTrue(ntFileRule.exists()); assertTrue(state.getBoolean(FulltextIndexConstants.PROP_INDEX_NODE_TYPE)); assertFalse(ntFileRule.getBoolean(FulltextIndexConstants.PROP_SYNC)); }