    @Test
    public void testSingleEdge() {

        final Map<UndirectedGraph.Edge<String>, Integer> w = new HashMap<>();
        final MutableUndirectedGraph<String> g = new MutableUndirectedGraph<>();
        g.addNode("a");
        g.addNode("b");
        w.put(g.addEdge("a", "b"), 10);

        final UndirectedGraph<String> mst = JarnikPrim.compute(g, w::get);
        assertEquals(2, mst.nodes().size());
        assertEquals(1, mst.edges().size());
        assertTrue(mst.isSuccessor("a", "b"));
        assertEquals(10, mst.edges().stream().mapToInt(w::get).sum());
    }