use of org.neo4j.kernel.impl.index.schema.EntityTokenRange in project neo4j by neo4j.
the class EntityTokenRangeTest method shouldTransposeNodeIdsAndLabelIds.
@Test
void shouldTransposeNodeIdsAndLabelIds() {
// given
long[][] labelsPerNode = new long[][] { { 1 }, { 1, 3 }, { 3, 5, 7 }, {}, { 1, 5, 7 }, {}, {}, { 1, 2, 3, 4 } };
// when
EntityTokenRange range = new EntityTokenRangeImpl(0, labelsPerNode, NODE);
// then
assertArrayEquals(new long[] { 0, 1, 2, 3, 4, 5, 6, 7 }, range.entities());
for (int i = 0; i < labelsPerNode.length; i++) {
assertArrayEquals(labelsPerNode[i], range.tokens(i));
}
}
Aggregations