/**
* subMap returns map with keys in requested range
*/
public void testSubMapContents() {
SnapTreeMap map = map5();
NavigableMap sm = map.subMap(two, true, four, false);
assertEquals(two, sm.firstKey());
assertEquals(three, sm.lastKey());
assertEquals(2, sm.size());
assertFalse(sm.containsKey(one));
assertTrue(sm.containsKey(two));
assertTrue(sm.containsKey(three));
assertFalse(sm.containsKey(four));
assertFalse(sm.containsKey(five));
Iterator i = sm.keySet().iterator();
Object k;
k = (Integer)(i.next());
assertEquals(two, k);
k = (Integer)(i.next());
assertEquals(three, k);
assertFalse(i.hasNext());
Iterator r = sm.descendingKeySet().iterator();
k = (Integer)(r.next());
assertEquals(three, k);
k = (Integer)(r.next());
assertEquals(two, k);
assertFalse(r.hasNext());
Iterator j = sm.keySet().iterator();
j.next();
j.remove();
assertFalse(map.containsKey(two));
assertEquals(4, map.size());
assertEquals(1, sm.size());
assertEquals(three, sm.firstKey());
assertEquals(three, sm.lastKey());
assertEquals("C", sm.remove(three));
assertTrue(sm.isEmpty());
assertEquals(3, map.size());
}