code: public static void assertTree(String message, String rootText, String preorder, Tree tree)
      {
          assertNotNull("tree should be non-null", tree);
          assertEquals(message + " (asserting type of root)", rootText, tree.getText());
          assertPreordered(message, preorder, tree);
      }
docs: Asserts a parse tree.
  
  @param message  the message to display on failure.
  @param rootText the text of the root of the tree.
  @param preorder the preorder traversal of the tree.
  @param tree     an ANTLR tree to assert on.