@Test
    public void testRemoveNotConnectedNetworkMasses() {
        mass1 = new Mass(1, 2);
        mass2 = new Mass(3, 4);
        mass3 = new Mass(5, 6);
        mass4 = new Mass(5, 6);
        mass4.setType(HAND);

        graph.addMasses(mass1, mass2, mass3, mass4);
        graph.addSpring(mass1, mass2);

        graph.removeNotConnectedNetworkMasses();
        assertEquals(3, graph.getMasses().size());
        assertSame(mass1, graph.getMasses().get(0));
        assertSame(mass2, graph.getMasses().get(1));
        assertSame(mass4, graph.getMasses().get(2));
    }