### Question:
Range implements Serializable { public boolean intersects(double b0, double b1) { if (b0 <= this.lower) { return (b1 > this.lower); } else { return (b0 < this.upper && b1 >= b0); } } Range(double lower, double upper); double getLowerBound(); double getUpperBound(); double getLength(); double getCentralValue(); boolean contains(double value); boolean intersects(double b0, double b1); boolean intersects(Range range); double constrain(double value); static Range combine(Range range1, Range range2); static Range combineIgnoringNaN(Range range1, Range range2); static Range expandToInclude(Range range, double value); static Range expand(Range range,
                               double lowerMargin, double upperMargin); static Range shift(Range base, double delta); static Range shift(Range base, double delta,
                              boolean allowZeroCrossing); static Range scale(Range base, double factor); @Override boolean equals(Object obj); boolean isNaNRange(); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testIntersects() { Range r1 = new Range(0.0, 1.0); assertFalse(r1.intersects(-2.0, -1.0)); assertFalse(r1.intersects(-2.0, 0.0)); assertTrue(r1.intersects(-2.0, 0.5)); assertTrue(r1.intersects(-2.0, 1.0)); assertTrue(r1.intersects(-2.0, 1.5)); assertTrue(r1.intersects(0.0, 0.5)); assertTrue(r1.intersects(0.0, 1.0)); assertTrue(r1.intersects(0.0, 1.5)); assertTrue(r1.intersects(0.5, 0.6)); assertTrue(r1.intersects(0.5, 1.0)); assertTrue(r1.intersects(0.5, 1.5)); assertFalse(r1.intersects(1.0, 1.1)); assertFalse(r1.intersects(1.5, 2.0)); }