//-----------------------------------------------------------------------
public void testBidiClearBySubMap() {
if (isRemoveSupported() == false) return;
// extra test as other tests get complex
SortedBidiMap sm = (SortedBidiMap) makeFullMap();
Iterator it = sm.keySet().iterator();
it.next();
Object fromKey = it.next();
Object first = it.next();
Object second = it.next();
Object toKey = it.next();
Object fromKeyValue = sm.get(fromKey);
Object firstValue = sm.get(first);
Object secondValue = sm.get(second);
Object toKeyValue = sm.get(toKey);
SortedMap sub = sm.subMap(fromKey, toKey);
int size = sm.size();
assertEquals(3, sub.size());
sub.clear();
assertEquals(0, sub.size());
assertEquals(size - 3, sm.size());
assertEquals(size - 3, sm.inverseBidiMap().size());
assertEquals(false, sm.containsKey(fromKey));
assertEquals(false, sm.containsValue(fromKeyValue));
assertEquals(false, sm.inverseBidiMap().containsKey(fromKeyValue));
assertEquals(false, sm.inverseBidiMap().containsValue(fromKey));
assertEquals(false, sub.containsKey(fromKey));
assertEquals(false, sub.containsValue(fromKeyValue));
assertEquals(false, sm.containsKey(first));
assertEquals(false, sm.containsValue(firstValue));
assertEquals(false, sm.inverseBidiMap().containsKey(firstValue));
assertEquals(false, sm.inverseBidiMap().containsValue(first));
assertEquals(false, sub.containsKey(first));
assertEquals(false, sub.containsValue(firstValue));
assertEquals(false, sm.containsKey(second));
assertEquals(false, sm.containsValue(secondValue));
assertEquals(false, sm.inverseBidiMap().containsKey(secondValue));
assertEquals(false, sm.inverseBidiMap().containsValue(second));
assertEquals(false, sub.containsKey(second));
assertEquals(false, sub.containsValue(secondValue));
assertEquals(true, sm.containsKey(toKey));
assertEquals(true, sm.containsValue(toKeyValue));
assertEquals(true, sm.inverseBidiMap().containsKey(toKeyValue));
assertEquals(true, sm.inverseBidiMap().containsValue(toKey));
assertEquals(false, sub.containsKey(toKey));
assertEquals(false, sub.containsValue(toKeyValue));
}