@Test
public void testSnappedPointAndGeometry()
{

    Graph graph = createTestGraph(encodingManager);
    LocationIndex index = createIndex(graph, -1);
    // query directly the tower node
    QueryResult res = index.findClosest(-0.4, 0.9, EdgeFilter.ALL_EDGES);
    assertTrue(res.isValid());
    assertEquals(new GHPoint(-0.4, 0.9), res.getSnappedPoint());
    res = index.findClosest(-0.6, 1.6, EdgeFilter.ALL_EDGES);
    assertTrue(res.isValid());
    assertEquals(new GHPoint(-0.6, 1.6), res.getSnappedPoint());
    // query the edge (1,3). The edge (0,4) has 27674 as distance
    res = index.findClosest(-0.2, 0.3, EdgeFilter.ALL_EDGES);
    assertTrue(res.isValid());
    assertEquals(26936, res.getQueryDistance(), 1);
    assertEquals(new GHPoint(-0.441624, 0.317259), res.getSnappedPoint());
}