Range { public static Range bounded(int lowerBound, int upperBound) { return new Range(lowerBound, upperBound); } private  Range(int low, int high); static Range unbounded(); static Range boundedFromBelow(int lowerBound); static Range boundedFromAbove(int upperBound); static Range bounded(int lowerBound, int upperBound); boolean contains(int value); boolean contains(Range range); @Override boolean equals(Object object); @Override int hashCode(); int getLowerBound(); int getUpperBound(); int getWidth(); @Override String toString(); int getNearestValue(int value);  }
@Test public void testOtherEquals() { Assert.assertEquals(Range.bounded(2, 5), Range.bounded(2, 5)); }