@Test
public void testGetPathsDirectionEnforcement2()
{

    // Test enforce start & end direction
    GraphHopper instance = initSquareGraphInstance(false);
    // Start in middle of edge 4-5 
    GHPoint start = new GHPoint(0.0015, 0.002);
    // End at middle of edge 2-3
    GHPoint end = new GHPoint(0.002, 0.0005);
    // Test enforce south start direction and east end direction ; expected nodes (9)-5-8-1-2-(10)
    GHRequest req = new GHRequest().addPoint(start, 180.).addPoint(end, 90.);
    GHResponse response = new GHResponse();
    List<Path> paths = instance.getPaths(req, response);
    assertArrayEquals(new int[]
    {
        9, 5, 8, 1, 2, 10
    }, paths.get(0).calcNodes().toArray());
    // Test uni-directional case
    req.setAlgorithm(AlgorithmOptions.DIJKSTRA);
    response = new GHResponse();
    paths = instance.getPaths(req, response);
    assertArrayEquals(new int[]
    {
        9, 5, 8, 1, 2, 10
    }, paths.get(0).calcNodes().toArray());
}