@Test
    public void testToConnectionMapCsvOnSortingOrder() {
        Mass mass5 = new Mass(X1, X1);
        Mass mass6 = new Mass(X1, X1);
        Mass mass7 = new Mass(X1, X1);
        Mass mass8 = new Mass(X1, X1);
        graph.addMasses(mass1, mass2, mass3, mass4, mass5, mass6, mass7, mass8);

        // mass 4 has higher index value => has to be first in connectin map in 
        // this spring entry, but on the second line since mass index 3 > 1 of
        // the below added spring
        graph.addSpring(mass4, mass3);

        // mass 2 has higher index value => has to be first in connectin map in 
        // this spring entry, but on the 1st line since mass index 1 < rest
        graph.addSpring(mass1, mass2);

        // mass 8 has higher index value => has to be first in connectin map in 
        // this spring entry, but on the 3rd line since the order of 1st and 2nd
        // column
        graph.addSpring(mass1, mass8);

        // mass 6 has higher index value => has to be first in connectio map in 
        // this entry and on the 3rd line.
        graph.addSpring(mass5, mass6);

        // mass 8 has higher index value => has to be first in connectio map in 
        // this entry and on the 4th line.
        graph.addSpring(mass8, mass7);

        result = GraphConverter.toConnectionMapCsv(graph);
        assertEquals(CONNECTION_MAP_PREAMBLE
                + "1,0,1\n"
                + "3,2,1\n"
                + "5,4,1\n"
                + "7,0,1\n"
                + "7,6,1\n", result);
    }