### Question:
Range implements IRange<T, Range<T>> { public static <T extends Comparable<?>> Range<T> atMost(T bound) { return new Range<>(null, bound); } 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 atMost() { Range<Integer> range = Range.atMost(5); assertThat((IntPredicate) range::contains) .accepts(5, 4, Integer.MIN_VALUE) .rejects(6, Integer.MAX_VALUE); assertThat((Predicate<Range<Integer>>) range::contains) .accepts(Range.exactly(5), Range.atMost(4)) .rejects(Range.exactly(6), Range.atLeast(5), Range.atLeast(4)); }