@Test
    public void testFindReachableMassesAndInputs() {
        mass1 = new Mass(0, 0); // center
        mass2 = new Mass(2, 0); // distance = 2
        mass3 = new Mass(2, 2); // distance = 2.8284271247461900976 (sqrt(2^2 + 2^2))
        graph.addMasses(mass1, mass2, mass3);

        Range range = new Range(0, 2);
        assertEquals(1, graph.findReachableMassesAndInputs(mass1, range, excludeCrossings).size());
        assertSame(mass2, graph.findReachableMassesAndInputs(mass1, range, excludeCrossings).get(0));

        range = new Range(2.6, 2.8);
        assertEquals(0, graph.findReachableMassesAndInputs(mass1, range, excludeCrossings).size());

        range = new Range(2.8, 2.9);
        assertEquals(1, graph.findReachableMassesAndInputs(mass1, range, excludeCrossings).size());
        assertSame(mass3, graph.findReachableMassesAndInputs(mass1, range, excludeCrossings).get(0));
    }