@Test
public void testTraversalOfSubdividedEdge() {
Coordinate nearestPoint = new Coordinate(0.5, 2.0);
List<StreetEdge> edges = new ArrayList<StreetEdge>();
edges.add(e2);
StreetLocation intermediate = StreetLocation.createStreetLocation(_graph, "middle of e2", "foo", edges, nearestPoint);
RoutingRequest options = new RoutingRequest();
options.setMode(TraverseMode.CAR);
options.setRoutingContext(_graph, v1, v2);
// Creating a streetlocation splits a street and makes temporary edges that are only visible to one routing context.
intermediate.setTemporaryEdgeVisibility(options.rctx);
// All intersections take 10 minutes - we'll notice if one isn't counted.
double turnDurationSecs = 10.0 * 60.0;
options.traversalCostModel = (new DummyCostModel(turnDurationSecs));
options.turnReluctance = (1.0);
State s0 = new State(options);
State s1 = e1.traverse(s0);
State s2 = e2.traverse(s1);
State s3 = e3.traverse(s2);
Edge partialE2First = intermediate.getIncoming().iterator().next();
Edge partialE2Second = intermediate.getOutgoing().iterator().next();
System.out.println(intermediate.getIncoming());
System.out.println(intermediate.getOutgoing());
State partialS0 = new State(options);
State partialS1 = e1.traverse(partialS0);
State partialS2A = partialE2First.traverse(partialS1);
State partialS2B = partialE2Second.traverse(partialS2A);