Map<String, Object> pathData = MapUtil.map("start", node, "nodes", Arrays.asList(node, node2),"length", 1, "relationships", Collections.singletonList(relationship), "end", node2);
System.out.println("pathData = " + pathData);
Path path = RestPathParser.parse(pathData, restApi);
assertEquals(1,path.length());
assertEquals(1,path.lastRelationship().getId());
assertEquals(0,path.startNode().getId());
assertEquals(1,path.endNode().getId());
}
private Map<String, Object> node(int id) {
return MapUtil.map("data", Collections.EMPTY_MAP, "self", nodeUrl(id));