int count = 0;
final Map<String, Long> firstStepCounts = new HashMap<>();
final Map<String, Long> secondStepCounts = new HashMap<>();
while (traversal.hasNext()) {
count++;
Path path = traversal.next();
String first = path.get(0).toString();
String second = path.get(1).toString();
assertThat(first, not(second));
MapHelper.incr(firstStepCounts, first, 1l);
MapHelper.incr(secondStepCounts, second, 1l);
}
assertEquals(6, count);