public static void main(String args[]) {
    final Sorting <Integer> testTree = new Sorting <Integer> () {
      public int compare(Integer a, Integer b) {
        if ((int) a == (int) b) return 0 ;
        return a > b ? 1 : -1 ;
      }
    } ;
    final int NUM_TEST_RUNS = 100 ;
    final float DELETE_CHANCE = 0.5f ;
    final int MIN_INSERTIONS = 100, RUN_BONUS = 5 ;
    //
    //  
    for (int runID = 0 ; runID < NUM_TEST_RUNS ; runID++) {
      final int numInsertions = MIN_INSERTIONS + (runID * RUN_BONUS) ;
      int numDeletions = 0 ;
      final Stack <Object> nodeRefs = new Stack <Object> () ;
      //
      //  We insert random integers onto the tree, along with a certain chance
      //  of deleting random entries.
      for (int n = numInsertions ; n-- > 0 ;) {
        final int val = (int) (Math.random() * numInsertions) ;
        nodeRefs.addLast(testTree.insert(val)) ;
        if (Math.random() < DELETE_CHANCE) {
          final int nodeIndex = (int) (Math.random() * nodeRefs.size()) ;
          final Object gone = nodeRefs.removeIndex(nodeIndex) ;
          testTree.deleteRef(gone) ;
          numDeletions++ ;
        }
      }
      //
      //  We then check to ensure that all nodes are accounted for, and clear
      //  the remaining nodes-
      if (testTree.size() + numDeletions != numInsertions) {
        I.complain("INCORRECT NUMBER OF INSERTIONS/DELETIONS!") ;
      }
      I.add(testTree.toString()) ;
      I.add("\n  In Sequence: ") ;
      for (Integer i : testTree) I.add(i+" ") ;
      I.add(
        "\n  RUN NO. "+runID+": "+numInsertions+
        " INSERTIONS AND "+numDeletions+" DELETIONS"
      ) ;
      while (nodeRefs.size > 0) testTree.deleteRef(nodeRefs.removeFirst()) ;
      if (testTree.size != 0) I.complain("DID NOT DELETE ALL NODES!") ;
      I.add("\n  ALL TESTS OKAY") ;
    }
    I.add("\n\n  ALL RUNS OKAY") ;
  }