@Test
    public void testCalculate() throws Exception {
        List<Vertex> vertices = createVertices();

        new Prim().calculate(vertices);

        assertThat(vertices.toString(),
            is("[{number=0, distance=0, prev=-1}, {number=1, distance=2, prev=0}, {number=2, distance=3, prev=1}, {number=3, distance=5, prev=2}, {number=4, distance=1, prev=2}]"));
    }