private void checkNotComparable(Interval x, Interval y) { try { x.compareTo(y); Assert.assertTrue(false); } catch (AssertionError e) { // expected } }
private void check(Interval x, Interval y, int expected) { Assert.assertEquals(expected, sign(x.compareTo(y))); }