@Test public void testCopyWithSelfRef() { Graph g = initUnsorted(createGraph()); g.edge(0, 0, 11, true); CHGraph lg = new GraphBuilder(encodingManager).chGraphCreate(new FastestWeighting(carEncoder)); GHUtility.copyTo(g, lg); assertEquals(g.getAllEdges().length(), lg.getEdges()); }