@Test
    public void testIsConnected() {
        assertFalse(spring.isConnected(null));
        assertFalse(spring.isConnected(new Mass(1, 2)));
        assertTrue(spring.isConnected(mass1));
        assertTrue(spring.isConnected(mass2));
    }