### Question:
SortedRangeList implements Iterable<Range> { public boolean contains(int value) { Range key = new Range(value, value); SortedSet<Range> head = set.headSet(key); if (!head.isEmpty()) { if (head.last().max >= value) { return true; } } return set.contains(key); } SortedRangeList();  SortedRangeList(SortedRangeList list); void addRange(int min, int max); Iterator<Range> getRanges(); Iterator<Range> getRanges(boolean forward); int getMin(); int getMax(); int getNumRanges(); void removeRange(int min, int max); boolean contains(int value); boolean contains(int min, int max); int getRangeIndex(int value); Range getRange(int index); long getNumValues(); boolean intersects(int min, int max); boolean isEmpty(); void remove(SortedRangeList other); SortedRangeList intersect(SortedRangeList other); @Override String toString(); @Override Iterator<Range> iterator();  }### Answer:
@Test public void testContains() { list.addRange(-1234567, -1234555); list.addRange(-18, -5); list.addRange(4, 7); list.addRange(10,11); assertTrue(!list.contains(Integer.MIN_VALUE)); assertTrue(!list.contains(-2223344)); assertTrue(!list.contains(-1234568)); assertTrue(list.contains(-1234567)); assertTrue(list.contains(-1234560)); assertTrue(list.contains(-1234555)); assertTrue(!list.contains(-1234554)); assertTrue(!list.contains(-100)); assertTrue(!list.contains(-19)); assertTrue(list.contains(-18)); assertTrue(list.contains(-10)); assertTrue(list.contains(-5)); assertTrue(!list.contains(-3)); assertTrue(!list.contains(0)); assertTrue(!list.contains(2)); assertTrue(!list.contains(3)); assertTrue(list.contains(4)); assertTrue(list.contains(5)); assertTrue(list.contains(6)); assertTrue(list.contains(7)); assertTrue(!list.contains(8)); assertTrue(!list.contains(9)); assertTrue(list.contains(10)); assertTrue(list.contains(11)); assertTrue(!list.contains(12)); assertTrue(!list.contains(13)); }