change the return type of queryStrategy.getNextVisitVertex from
List<Vertex> to Vertex