public void testBulkCreateLabelsCommand() {
try {
final GraphDatabaseService graphDb = app.getGraphDatabaseService();
final Set<Label> expectedLabels = new LinkedHashSet<>();
expectedLabels.add(DynamicLabel.label("Principal"));
expectedLabels.add(DynamicLabel.label("Group"));
expectedLabels.add(DynamicLabel.label("AccessControllable"));
expectedLabels.add(DynamicLabel.label("AbstractUser"));
// intentionally create raw Neo4j transaction and create nodes in there
try (Transaction tx = graphDb.beginTx()) {
for (int i=0; i<100; i++) {
final Node test = graphDb.createNode();
// set ID and type so that the rebuild index command identifies it as a Structr node.
test.setProperty("type", "Group");
test.setProperty("id", UUID.randomUUID().toString().replace("-", ""));
}