Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   package org.mapdb;
   
   /*
    *  Licensed to the Apache Software Foundation (ASF) under one or more
    *  contributor license agreements.  See the NOTICE file distributed with
    *  this work for additional information regarding copyright ownership.
    *  The ASF licenses this file to You under the Apache License, Version 2.0
    *  (the "License"); you may not use this file except in compliance with
    *  the License.  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  
  import java.util.*;
  
  
  
  public class BTreeMapExtendTest extends TestCase {
  
      BTreeMap tm;
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
      Object objArray[] = new Object[1000];
  
      protected static BTreeMap newBTreeMap() {
          return DBMaker.newMemoryDB().cacheDisable().transactionDisable().asyncWriteDisable().make().getTreeMap("Test");
      }
  
  
      public void test_TreeMap_Constructor_Default() {
          BTreeMap treeMap = newBTreeMap();
          assertTrue(treeMap.isEmpty());
          assertNotNull(treeMap.comparator());
          assertEquals(0, treeMap.size());
  
          try {
              treeMap.firstKey();
              fail("should throw NoSuchElementException");
          } catch (NoSuchElementException e) {
              // Expected
          }
          assertNull(treeMap.firstEntry());
  
          try {
              treeMap.lastKey();
              fail("should throw NoSuchElementException");
          } catch (NoSuchElementException e) {
              // Expected
          }
          assertNull(treeMap.lastEntry());
  
          try {
              treeMap.ceilingKey(1);
          } catch (NoSuchElementException e) {
              // Expected
          }
          assertNull(treeMap.ceilingEntry(1));
 
         try {
             treeMap.floorKey(1);
         } catch (NoSuchElementException e) {
             // Expected
         }
         assertNull(treeMap.floorEntry(1));
         assertNull(treeMap.lowerKey(1));
         assertNull(treeMap.lowerEntry(1));
         assertNull(treeMap.higherKey(1));
         assertNull(treeMap.higherEntry(1));
         assertFalse(treeMap.containsKey(1));
         assertFalse(treeMap.containsValue(1));
         assertNull(treeMap.get(1));
 
         assertNull(treeMap.pollFirstEntry());
         assertNull(treeMap.pollLastEntry());
         assertEquals(0, treeMap.values().size());
     }
 
 
 
 
     public void test_TreeMap_clear() {
         .clear();
         assertEquals(0, .size());
     }
 
 
     public void test_SubMap_Constructor() {
     }
 
     public void test_SubMap_clear() {
         .clear();
         assertEquals(0, .size());
     }
 
     public void test_SubMap_comparator() {
     }
 
     public void test_SubMap_containsKey() {
         String key = null;
         for (int counter = 101; counter < 109; counter++) {
             key = [counter].toString();
             assertTrue("SubMap contains incorrect elements"
                     .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     .containsKey(key));
         }
 
         // Check boundary
         key = [100].toString();
         assertTrue("SubMap contains incorrect elements"
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
 
         key = [109].toString();
         assertFalse("SubMap contains incorrect elements"
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
 
         // With Comparator
         for (int counter = 101; counter < 109; counter++) {
             key = [counter].toString();
             assertTrue("SubMap contains incorrect elements",
                     .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     
                             .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     
                             .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     
                             .containsKey(key));
             assertTrue("SubMap contains incorrect elements",
                     
                             .containsKey(key));
         }
 
         // Check boundary
         key = [100].toString();
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
 
         key = [109].toString();
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
         assertFalse("SubMap contains incorrect elements",
                 .containsKey(key));
         assertTrue("SubMap contains incorrect elements",
                 .containsKey(key));
     }
 
     public void test_SubMap_containsValue() {
         Object value = null;
         for (int counter = 101; counter < 109; counter++) {
             value = [counter];
             assertTrue("SubMap contains incorrect elements"
                     .containsValue(value));
             assertTrue("SubMap contains incorrect elements",
                     .containsValue(value));
             assertTrue("SubMap contains incorrect elements",
                     .containsValue(value));
             assertTrue("SubMap contains incorrect elements",
                     .containsValue(value));
             assertTrue("SubMap contains incorrect elements",
                     .containsValue(value));
         }
 
         // Check boundary
         value = [100];
         assertTrue("SubMap contains incorrect elements"
                 .containsValue(value));
         assertFalse("SubMap contains incorrect elements",
                 .containsValue(value));
         assertFalse("SubMap contains incorrect elements",
                 .containsValue(value));
         assertTrue("SubMap contains incorrect elements",
                 .containsValue(value));
         assertTrue("SubMap contains incorrect elements",
                 .containsValue(value));
 
         value = [109];
         assertFalse("SubMap contains incorrect elements"
                 .containsValue(value));
         assertFalse("SubMap contains incorrect elements",
                 .containsValue(value));
         assertTrue("SubMap contains incorrect elements",
                 .containsValue(value));
         assertFalse("SubMap contains incorrect elements",
                 .containsValue(value));
         assertTrue("SubMap contains incorrect elements",
                 .containsValue(value));
 
 //        assertFalse(subMap_default.containsValue(null));
 
     }
 
     public void test_SubMap_entrySet() {
         Set entrySet = .entrySet();
         assertFalse(entrySet.isEmpty());
         assertEquals(9, entrySet.size());
 
         entrySet = .entrySet();
         assertFalse(entrySet.isEmpty());
         assertEquals(8, entrySet.size());
 
         entrySet = .entrySet();
         assertFalse(entrySet.isEmpty());
         assertEquals(9, entrySet.size());
 
         entrySet = .entrySet();
         assertFalse(entrySet.isEmpty());
         assertEquals(9, entrySet.size());
 
         entrySet = .entrySet();
         assertFalse(entrySet.isEmpty());
         assertEquals(10, entrySet.size());
     }
 
     public void test_SubMap_firstKey() {
         String firstKey1 = new Integer(100).toString();
         String firstKey2 = new Integer(101).toString();
         assertEquals(firstKey1.firstKey());
 
         try {
             .subMap(firstKey1firstKey1).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey2firstKey2)
                     .firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey2firstKey2)
                     .firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey1firstKey1)
                     .firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey1firstKey1)
                     .firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         // With Comparator
         assertEquals(firstKey1.firstKey());
                 .firstKey());
                 .firstKey());
                 .firstKey());
                 .firstKey());
 
         try {
             .subMap(firstKey1firstKey1).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey2,
                     firstKey2).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey2,
                     firstKey2).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey1,
                     firstKey1).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(firstKey1,
                     firstKey1).firstKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
     }
 
     public void test_SubMap_lastKey() {
         String lastKey1 = new Integer(108).toString();
         String lastKey2 = new Integer(109).toString();
         assertEquals(lastKey1.lastKey());
 
         try {
             .subMap(lastKey1lastKey1).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey1lastKey1)
                     .lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey2lastKey2)
                     .lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey1lastKey1)
                     .lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey2lastKey2)
                     .lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         // With Comparator
         assertEquals(lastKey1.lastKey());
                 .lastKey());
                 .lastKey());
                 .lastKey());
                 .lastKey());
 
         try {
             .subMap(lastKey1lastKey1).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey1,
                     lastKey1).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey2,
                     lastKey2).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey1,
                     lastKey1).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
 
         try {
             .subMap(lastKey2,
                     lastKey2).lastKey();
             fail("should throw NoSuchElementException");
         } catch (NoSuchElementException e) {
             // Expected
         }
     }
 
     public void test_SubMap_get() {
         // left boundary
         Integer value = new Integer(100);
         assertEquals(value.get(value.toString()));
                 .toString()));
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
 
         // normal value
         value = new Integer(105);
         assertEquals(value.get(value.toString()));
         assertEquals(value.get(value
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
 
         // right boundary
         value = new Integer(109);
         assertEquals(null.get(value.toString()));
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
                 .toString()));
         assertEquals(value.get(value
                 .toString()));
 
         // With Comparator to test inInRange
         // left boundary
         value = new Integer(100);
         assertEquals(value.get(value.toString()));
 
         // normal value
         value = new Integer(105);
         assertEquals(value.get(value.toString()));
 
         // right boundary
         value = new Integer(109);
         assertEquals(null.get(value.toString()));
     }
 
     public void test_SubMap_headMap() {
         String endKey = new Integer(99).toString();
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         SortedMap headMap = null;
         endKey = new Integer(100).toString();
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         for (int i = 0, j = 101; i < 8; i++) {
             endKey = new Integer(i + j).toString();
             headMap = .headMap(endKey);
             assertEquals(i + 1, headMap.size());
 
             headMap = .headMap(endKey);
             assertEquals(iheadMap.size());
 
             headMap = .headMap(endKey);
             assertEquals(iheadMap.size());
 
             headMap = .headMap(endKey);
             assertEquals(i + 1, headMap.size());
 
             headMap = .headMap(endKey);
             assertEquals(i + 1, headMap.size());
         }
 
         endKey = new Integer(109).toString();
         headMap = .headMap(endKey);
         assertEquals(9, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(8, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(8, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(9, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(9, headMap.size());
 
         endKey = new Integer(110).toString();
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         // With Comparator
         endKey = new Integer(99).toString();
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         headMap = null;
         endKey = new Integer(100).toString();
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(0, headMap.size());
 
         for (int i = 0, j = 101; i < 8; i++) {
             endKey = new Integer(i + j).toString();
             headMap = .headMap(endKey);
             assertEquals(i + 1, headMap.size());
 
             headMap = 
                     .headMap(endKey);
             assertEquals(iheadMap.size());
 
             headMap = 
                     .headMap(endKey);
             assertEquals(iheadMap.size());
 
             headMap = 
                     .headMap(endKey);
             assertEquals(i + 1, headMap.size());
 
             headMap = 
                     .headMap(endKey);
             assertEquals(i + 1, headMap.size());
         }
 
         endKey = new Integer(108).toString();
         headMap = .headMap(endKey);
         assertEquals(8, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(7, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(7, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(8, headMap.size());
 
         headMap = .headMap(endKey);
         assertEquals(8, headMap.size());
 
         endKey = new Integer(110).toString();
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .headMap(endKey);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
     }
 
     public void test_SubMap_isEmpty() {
         assertFalse(.isEmpty());
 
         Object startKey = new Integer(100);
         Object endKey = startKey;
         SortedMap subMap = .subMap(startKey.toString(), endKey.toString());
         assertTrue(subMap.isEmpty());
         subMap = .subMap(startKey.toString(), endKey.toString());
         assertTrue(subMap.isEmpty());
         subMap = .subMap(startKey.toString(),
                 endKey.toString());
         assertTrue(subMap.isEmpty());
         subMap = .subMap(startKey.toString(),
                 endKey.toString());
         assertTrue(subMap.isEmpty());
 
         for (int i = 0, j = 101; i < 8; i++) {
             startKey = i + j;
             endKey = startKey;
 
             subMap = .subMap(startKey.toString(), endKey
                     .toString());
             assertTrue(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertTrue(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertTrue(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertTrue(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertTrue(subMap.isEmpty());
         }
 
         for (int i = 0, j = 101; i < 5; i++) {
             startKey = i + j;
             endKey = i + j + 4;
 
             subMap = .subMap(startKey.toString(), endKey
                     .toString());
             assertFalse(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertFalse(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertFalse(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertFalse(subMap.isEmpty());
 
             subMap = .subMap(startKey
                     .toString(), endKey.toString());
             assertFalse(subMap.isEmpty());
         }
 
         startKey = new Integer(109).toString();
         endKey = startKey;
         subMap = .subMap(startKey.toString(), endKey.toString());
         assertTrue(subMap.isEmpty());
         subMap = .subMap(startKeyendKey);
         assertTrue(subMap.isEmpty());
         subMap = .subMap(startKeyendKey);
         assertTrue(subMap.isEmpty());
 
     }
 
     public void test_SubMap_keySet() {
         Set keySet = .keySet();
         assertFalse(keySet.isEmpty());
         assertEquals(9, keySet.size());
 
         keySet = .entrySet();
         assertFalse(keySet.isEmpty());
         assertEquals(8, keySet.size());
 
         keySet = .entrySet();
         assertFalse(keySet.isEmpty());
         assertEquals(9, keySet.size());
 
         keySet = .entrySet();
         assertFalse(keySet.isEmpty());
         assertEquals(9, keySet.size());
 
         keySet = .entrySet();
         assertFalse(keySet.isEmpty());
         assertEquals(10, keySet.size());
     }
 
     public void test_SubMap_put() {
         Integer value = new Integer(100);
         int addValue = 5;
 
         .put(value.toString(), value + addValue);
         assertEquals(value + addValue.get(value.toString()));
 
         try {
             .put(value.toString(), value
                     + addValue);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .put(value.toString(), value
                     + addValue);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
                 .put(value.toString(), value + addValue);
         assertEquals(value + addValue
                 .get(value.toString()));
 
                 .put(value.toString(), value + addValue);
         assertEquals(value + addValue
                 .get(value.toString()));
 
         value = new Integer(109);
         try {
             .put(value.toString(), value + addValue);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
         try {
             .put(value.toString(), value
                     + addValue);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
                 .put(value.toString(), value + addValue);
         assertEquals(value + addValue
                 .get(value.toString()));
 
         try {
             .put(value.toString(), value
                     + addValue);
             fail("should throw IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // Expected
         }
 
                 .put(value.toString(), value + addValue);
         assertEquals(value + addValue
                 .get(value.toString()));
     }
 
     public void test_SubMap_remove() {
         Integer value = new Integer(100);
 
         .remove(value.toString());
         assertNull(.get(value.toString()));
 
 
 
 
 
         value = new Integer(109);
         .remove(value.toString());
         assertNull(.get(value.toString()));
 
 
 
 
    }
    public void test_SubMap_subMap_NoComparator() {
        String startKey = new Integer[100].toString();
        String endKey = new Integer[100].toString();
        try {
            .subMap(startKeyendKey);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // Expected
        }
        try {
            .subMap(startKeyendKey);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // Expected
        }
        try {
            .subMap(startKeyendKey);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // Expected
        }
        try {
            .subMap(startKeyendKey);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // Expected
        }
        try {
            .subMap(startKeyendKey);
            fail("should throw IllegalArgumentException");
        } catch (