use of org.neo4j.kernel.impl.store.NodeLabels in project neo4j by neo4j.
the class BatchInsertTest method shouldNotCreateSameLabelTwiceOnSameNode.
@Test
public void shouldNotCreateSameLabelTwiceOnSameNode() throws Exception {
// GIVEN
BatchInserter inserter = globalInserter;
// WHEN
long nodeId = inserter.createNode(map("itemId", 1000L), label("Item"), label("Item"));
// THEN
NodeStore nodeStore = getFlushedNeoStores(inserter).getNodeStore();
NodeRecord node = nodeStore.getRecord(nodeId, nodeStore.newRecord(), NORMAL);
NodeLabels labels = NodeLabelsField.parseLabelsField(node);
long[] labelIds = labels.get(nodeStore);
assertEquals(1, labelIds.length);
}
Aggregations