### Question:
BST implements BinarySearchTree<Key, Val> { public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; }  int size(); boolean isEmpty(); boolean contains(Key key); Val find(Key key); void put(Key key, Val val); boolean remove(Key key); Key select(int rank); int rank(Key key); Key floor(Key key); Key ceil(Key key);  }### Answer:
@Test public void select() { for (int i = 0; i < expect.size(); i++) { Assert.assertEquals(expect.select(i), bst.select(i)); } }