### Question:
Range extends Base { Range(@Nullable final Bound<T> lowerBound, @Nullable final Bound<T> upperBound) { this.lowerBound = lowerBound; this.upperBound = upperBound; if (hasSameExclusiveBounds()) { throw new SameExclusiveBoundsException(this); } } Range(@Nullable final Bound<T> lowerBound, @Nullable final Bound<T> upperBound); @Nullable Bound<T> lowerBound(); @Nullable Bound<T> upperBound(); @Nullable T lowerEndpoint(); @Nullable T upperEndpoint(); boolean isUpperBoundExclusive(); boolean isUpperBoundInclusive(); boolean isLowerBoundExclusive(); boolean isLowerBoundInclusive(); boolean isEmpty(); boolean isBounded(); String serialize(final Function<T, String> serializer); @Override String toString();  }### Answer:
@Test public void isInvalidWhenBoundsAreEqualAndExclusive() throws Exception { final Bound<Integer> lowerBound = Bound.exclusive(4); final Bound<Integer> upperBound = lowerBound; assertThatThrownBy(() -> range(lowerBound, upperBound)).isInstanceOf(SameExclusiveBoundsException.class); }
@Test public void equalityIsReflexiveAndSymmetric() throws Exception { final Range<Integer> range = range(Bound.exclusive(4), Bound.exclusive(10)); final Range<Integer> other = range(Bound.exclusive(4), Bound.exclusive(10)); assertThat(range.equals(other) && other.equals(range)).isTrue(); assertThat(range.hashCode() == other.hashCode()); }