code: public static void assertTree(int rootType, String preorder, Tree tree)
      {
          assertNotNull("tree should be non-null", tree);
          assertPreordered(null, preorder, tree);
          assertEquals("Comparing root type", rootType, tree.getType());
      }
docs: Asserts a parse tree.
  
  @param rootType the type of the root of the tree.
  @param preorder the preorder traversal of the tree.
  @param tree     an ANTLR tree to assert on.