@Test
public void hashCodeTest() {

    final RangeImpl rangeImpl = new RangeImpl(Range.RangeBoundary.OPEN, 10, 15, Range.RangeBoundary.OPEN);
    Assert.assertEquals(rangeImpl.hashCode(), rangeImpl.hashCode());
    RangeImpl rangeImpl2 = new RangeImpl(Range.RangeBoundary.OPEN, 10, 15, Range.RangeBoundary.OPEN);
    Assert.assertEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
    rangeImpl2 = new RangeImpl(Range.RangeBoundary.OPEN, 10, 15, Range.RangeBoundary.CLOSED);
    Assert.assertNotEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
    rangeImpl2 = new RangeImpl(Range.RangeBoundary.CLOSED, 10, 15, Range.RangeBoundary.OPEN);
    Assert.assertNotEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
    rangeImpl2 = new RangeImpl(Range.RangeBoundary.CLOSED, 10, 15, Range.RangeBoundary.CLOSED);
    Assert.assertNotEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
    rangeImpl2 = new RangeImpl(Range.RangeBoundary.CLOSED, 12, 15, Range.RangeBoundary.CLOSED);
    Assert.assertNotEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
    rangeImpl2 = new RangeImpl(Range.RangeBoundary.CLOSED, 12, 17, Range.RangeBoundary.CLOSED);
    Assert.assertNotEquals(rangeImpl.hashCode(), rangeImpl2.hashCode());
}