@Test public void testInitWithNullTargetId(){ Entity.ID sourceId = Entity.ID.valueOf("test-source-id"); Relationship.Name relationshipName = Relationship.Name.valueOf("test-relationship"); Attribute.Name attributeName = Attribute.Name.valueOf("test-attribute-name"); try { NewRelationship relationship = NewRelationship.between(sourceId, null).withLabel(relationshipName).withAttribute(attributeName) .value(true).build(); fail("Should have thrown an exception"); } catch (Exception e) { assertTrue(e instanceof IllegalArgumentException); } }
public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); }
NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } }
NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private  NewRelationship(Entity.ID source, Entity.ID target); }
NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private  NewRelationship(Entity.ID source, Entity.ID target); Entity.ID getSourceID(); Entity.ID getTargetID(); Relationship.Name getName(); Map<Attribute.Name, Object> getAttributes(); static Builder between(Entity.ID sourceID, Entity.ID targetID); static Builder between(Entity source, Entity target); }
NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private  NewRelationship(Entity.ID source, Entity.ID target); Entity.ID getSourceID(); Entity.ID getTargetID(); Relationship.Name getName(); Map<Attribute.Name, Object> getAttributes(); static Builder between(Entity.ID sourceID, Entity.ID targetID); static Builder between(Entity source, Entity target);  }