MonitoredRedBlackTree extends RedBlackTree<E> { @Override public RedBlackTreeNode<E> insert(E value) { final RedBlackTreeNode<E> inserted = super.insert(value); monitor.validate(); return inserted; } MonitoredRedBlackTree(Comparator<E> comparator); @Override RedBlackTreeNode<E> insert(E value); @Override RedBlackTreeNode<E> delete(E value);  }
@Test public void testBulkInsertion() throws Exception { final RedBlackTree<Integer> tree = tree(); tree.insert(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14); tree.insert(-14, -13, -12, -11, -10, -9, -8, -7, -8, -6, -5, -4, -3, -2, -1); }