### Question:
Range implements Iterable<E> { public void merge(Range<E> range) { first = min(first, range.getFirst()); last = max(last, range.getLast()); } Range(E element);  Range(E first, E last);  Range(E first, E last, IEnumerator<E> enumerator);  Range(Range<E> other); E getFirst(); E getLast(); boolean contains(E element); boolean contains(Range<E> range); boolean containedBy(E first, E last); boolean overlaps(Range<E> range); boolean overlaps(E first, E last); boolean canAdd(Range<E> range); void add(Range<E> range); void merge(Range<E> range); Range<E> remove(E element); Range<E> remove(Range<E> range); Range<E> remove(E first, E last); boolean equals(Object object); int hashCode(); String toString(); @Override Iterator<E> iterator();  }### Answer:
@Test public void testMerge() { Range<Integer> range; (range = range(-10, 10)).merge(range(-20, -11)); assertEquals(range(-20, 10), range); (range = range(-10, 10)).merge(range(-20, -10)); assertEquals(range(-20, 10), range); (range = range(-10, 10)).merge(range(-10, 10)); assertEquals(range(-10, 10), range); (range = range(-10, 10)).merge(range(-1, 1)); assertEquals(range(-10, 10), range); (range = range(-10, 10)).merge(range(10, 20)); assertEquals(range(-10, 20), range); (range = range(-10, 10)).merge(range(11, 20)); assertEquals(range(-10, 20), range); (range = range(-10, 10)).merge(range(-20, 20)); assertEquals(range(-20, 20), range); }