### Question:
ObjectRangeMap { public synchronized boolean contains(long index) { if (lastRange != null && lastRange.contains(index)) { return true; } int pos = getPositionOfRangeAtOrBefore(new ObjectValueRange<T>(index, index, null)); if (pos < 0) { return false; } lastRange = ranges.get(pos); return lastRange.contains(index); } ObjectRangeMap(); IndexRangeIterator getIndexRangeIterator(); IndexRangeIterator getIndexRangeIterator(long start, long end); synchronized void setObject(long start, long end, T object); synchronized void clearRange(long start, long end); synchronized boolean contains(long index); synchronized T getObject(long index);  }### Answer:
@Test public void testContains() { ObjectRangeMap<Object> map = new ObjectRangeMap<Object>(); Object obj1 = new Object(); map.setObject(20,30,obj1); map.setObject(40,50,obj1); map.setObject(60,70,obj1); map.setObject(80,90,obj1); assertTrue(!map.contains(10)); assertTrue(!map.contains(19)); assertTrue( map.contains(20)); assertTrue( map.contains(25)); assertTrue( map.contains(30)); assertTrue(!map.contains(31)); assertTrue(!map.contains(39)); assertTrue( map.contains(40)); assertTrue(!map.contains(79)); assertTrue( map.contains(80)); assertTrue( map.contains(81)); assertTrue( map.contains(89)); assertTrue( map.contains(90)); assertTrue(!map.contains(91)); assertTrue(!map.contains(1000)); }