Relationship rel = sourceNode.createRelationshipTo(targetNode, DynamicRelationshipType.withName("ACTS_IN"));
rel.setProperty("ROLE_NAME", "Neo");
rel.setProperty("ROLE_TYPE", "Lead Actor");
Role role = (Role) mapper.getEntityFromRelationship(rel, KunderaMetadataManager.getEntityMetadata(kunderaMetadata, Actor.class),
KunderaMetadataManager.getEntityMetadata(kunderaMetadata, Actor.class).getRelation("movies"));
Assert.assertNotNull(role);
Assert.assertEquals("Neo", role.getRoleName());
Assert.assertEquals("Lead Actor", role.getRoleType());
rel.delete();
sourceNode.delete();
targetNode.delete();