### Question:
Range implements IRange<T, Range<T>> { @Override public boolean contains(Range<T> other) { if (other == null) { return false; } if (this.equals(other)) { return true; } if (isAtLeast()) { if (other.isAtMost() || other.isAll()) { return false; } return contains(other.getMin()); } if (isAtMost()) { if (other.isAtLeast() || other.isAll()) { return false; } return contains(other.getMax()); } return contains(other.getMin()) && contains(other.getMax()); } Range(T min, T max); @Override String toString(); static Range<T> exactly(T exactly); @JsonCreator static Range<T> of(@JsonProperty("min") T min, @JsonProperty("max") T max); static Range<T> atMost(T bound); static Range<T> atLeast(T bound); static Range<T> all(); @Override @JsonIgnore boolean isExactly(); @Override @JsonIgnore boolean isAtLeast(); @Override @JsonIgnore boolean isAtMost(); @Override @JsonIgnore boolean isAll(); @Override @JsonIgnore boolean isOpen(); @Override boolean contains(Range<T> other); @ValidationMethod(message = "If a range is not open in one direction, min needs to be less or equal to max") @JsonIgnore final boolean isOrdered(); @Override Range<T> span(@NonNull Range<T> other); @Override boolean contains(T value);  }### Answer:
@Test public void contains() { Range<Integer> range = Range.of(5, 10); assertThat((IntPredicate) range::contains) .accepts(5, 6, 7, 8, 9, 10) .rejects(Integer.MIN_VALUE, 4, 11, Integer.MAX_VALUE); assertThat((Predicate<Range<Integer>>) range::contains) .accepts(range, Range.of(5, 10), Range.exactly(7), Range.exactly(5), Range.exactly(10), Range.of(6, 9), Range.of(5, 9)) .rejects(Range.atMost(5), Range.atMost(10), Range.all(), Range.exactly(4), Range.exactly(11), Range.atLeast(5), Range.atLeast(10), Range.of(7, 11), Range.of(11, 12), Range.of(3, 4)); }