Graph graph = TinkerGraphFactory.createTinkerGraph();
DegreeRankProgram program = DegreeRankProgram.create().degreeQuery(new VertexQueryBuilder().direction(Direction.BOTH).labels("created")).build();
SerialGraphComputer computer = new SerialGraphComputer(graph, program, GraphComputer.Isolation.BSP);
computer.execute();
VertexMemory results = computer.getVertexMemory();
assertEquals(results.getProperty(graph.getVertex(1), DegreeRankProgram.DEGREE), 1l);
assertEquals(results.getProperty(graph.getVertex(2), DegreeRankProgram.DEGREE), 0l);
assertEquals(results.getProperty(graph.getVertex(3), DegreeRankProgram.DEGREE), 3l);