@Test
 public void testDeleteRelationship() {
   Transaction tx = restAPI.beginTx();
   Node n1 = restAPI.createNode(map("name", "newnode1"));
   Node n2 = restAPI.createNode(map("name", "newnode2"));
   Relationship rel = restAPI.createRelationship(n1, n2, Type.TEST, map("name", "rel"));
   rel.delete();
   tx.success();
   tx.finish();
   Relationship foundRelationship =
       TestHelper.firstRelationshipBetween(
           n1.getRelationships(Type.TEST, Direction.OUTGOING), n1, n2);
   Assert.assertNull("found relationship", foundRelationship);
 }
 @Override
 public void remove(Relationship relationship) {
    removeFromIndexes(relationship);
    relationship.delete();
 }