### Question:
Range implements IRange<T, Range<T>> { @Override public Range<T> span(@NonNull Range<T> other) { Range<T> out = this; if (this.getMax() != null && (other.getMax() == null || other.getMax().compareTo(this.getMax()) > 0)) { out = withMax(other.getMax()); } if (out.getMin() != null && (other.getMin() == null || other.getMin().compareTo(this.getMin()) < 0)) { out = out.withMin(other.getMin()); } return out; } 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 span() { assertThat(Range.exactly(5).span(Range.exactly(6))) .isEqualTo(Range.of(5, 6)) .isEqualTo(Range.exactly(6).span(Range.exactly(5))); assertThat(Range.of(5, 7).span(Range.exactly(6))) .isEqualTo(Range.of(5, 7)); }