@Test
public void testRemoveNode()
{

    FlagEncoder carEncoder = new CarFlagEncoder();
    BikeFlagEncoder bikeEncoder = new BikeFlagEncoder();
    EncodingManager em2 = new EncodingManager(carEncoder, bikeEncoder);
    GraphHopperStorage g = createSubnetworkTestStorage2(em2);
    PrepareRoutingSubnetworks instance = new PrepareRoutingSubnetworks(g, em2.fetchEdgeEncoders());
    EdgeExplorer edgeExplorer = g.createEdgeExplorer();
    assertFalse(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 4));
    assertFalse(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 5));
    assertFalse(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 6));
    // mark certain edges inaccessible for all encoders
    for (EdgeIteratorState edge : Arrays.asList(GHUtility.getEdge(g, 5, 6), GHUtility.getEdge(g, 4, 5), GHUtility.getEdge(g, 4, 6)))
    {
        for (FlagEncoder encoders : em2.fetchEdgeEncoders())
        {
            edge.setFlags(encoders.setAccess(0, false, false));
        }
    }
    assertTrue(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 4));
    assertTrue(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 5));
    assertTrue(instance.detectNodeRemovedForAllEncoders(edgeExplorer, 6));
}