final RestNode michael = restAPI.createNode(map("name", "Michael"));
final RestNode david = restAPI.createNode(map("name","David"));
final RestNode peter = restAPI.createNode(map("name","Peter"));
final RestRelationship rel1 = restAPI.getOrCreateRelationship(index, "uid", "42", michael, david, "KNOWS", map("at", "Neo4j"));
final RestRelationship rel2 = restAPI.getOrCreateRelationship(index, "uid", "42", michael, david, "KNOWS", map("at", "Neo4j"));
assertEquals(rel1,rel2);
assertEquals("Neo4j",rel1.getProperty("at"));
assertEquals("Neo4j",rel2.getProperty("at"));
final RestRelationship rel3 = restAPI.getOrCreateRelationship(index, "uid", "41", michael, david, "KNOWS", map("at", "Neo4j"));
assertEquals(false, rel3.equals(rel1));
}