@Test
    public void testConstructor() {
        spring = new Spring(graph, mass1, mass2);

        assertSame(graph, spring.graph);
        assertSame(mass1, spring.source);
        assertSame(mass2, spring.destination);
        assertEquals(mass1.getX(), spring.line.getP1().getX(), DELTA);
        assertEquals(mass1.getY(), spring.line.getP1().getY(), DELTA);
        assertEquals(mass2.getX(), spring.line.getP2().getX(), DELTA);
        assertEquals(mass2.getY(), spring.line.getP2().getY(), DELTA);
        assertEquals(SPRING_CONSTRAINT, spring.connectionType);
    }