### Question:
RangeSearchBST extends RedBlackBSTWithNoExtraMemory<Key, Val> { public List<Key> search(Key lo, Key hi) { return null; }  int size(Key lo, Key hi); List<Key> search(Key lo, Key hi);  }### Answer:
@Test public void testSearchRandom() { int N = 10; for (int i = 0; i < 10; i++, N <<= 1) { RangeSearchBST<Integer, Integer> test = new RangeSearchBST<>(); int[] testData = Shuffler.getRandomArray(N, -N, N); for (int data : testData) test.put(data, data); Arrays.sort(testData); for (int j = 0; j < 100; j++) { int a = -N + random.nextInt(2 * N), b = -N + random.nextInt(2 * N); int hi = Math.max(a, b), lo = Math.min(a, b); Assert.assertEquals(expectSearch(testData, lo, hi), test.search(lo, hi)); } } }