/**
* Tests if the specified ranges overlap.
*/
public void testRangesOverlap() {
GeometryUtil util = GeometryUtil.getInstance();
// disjoint
assertFalse(util.rangesOverlap(1, 10, 20, 25));
// r1 == r2
assertTrue(util.rangesOverlap(1, 10, 1, 10));
// r1 in r2
assertTrue(util.rangesOverlap(12, 20, 10, 25));
// r2 in r1
assertTrue(util.rangesOverlap(50, 100, 75, 80));
// r1 and r2 have overlapping region
assertTrue(util.rangesOverlap(30, 45, 40, 70));
}