}
@Test
public void testCreateNodeUniquely() {
final RestIndex<Node> index = restAPI.createIndex(Node.class, "unique-node", LuceneIndexImplementation.EXACT_CONFIG);
final RestNode node1 = restAPI.getOrCreateNode(index, "uid", "42", map("name", "Michael"), NO_LABELS);
final RestNode node2 = restAPI.getOrCreateNode(index, "uid", "42", map("name", "Michael2"), NO_LABELS);
assertEquals(node1,node2);
assertEquals("Michael",node1.getProperty("name"));
assertEquals("Michael",node2.getProperty("name"));
final RestNode node3 = restAPI.getOrCreateNode(index, "uid", "41", map("name", "Emil"), NO_LABELS);
assertEquals(false, node1.equals(node3));
}