TreeParser { public Tree<S> parse(String treeString) { tokens = tokenize(treeString); currentTokenId = 0; Tree<S> tree = parseExpr(new Tree<S>()); Tree<S> t1 = tree.getChild(0); t1.makeParentNull(); return t1; } TreeParser(INodeReader<S> nodeParser); Tree<S> parse(String treeString); static Tree<String> parseStringTree(String treeString);  }
@Test public final void testParse() { assertEquals(parser.parse(treeString).toString(), treeString); assertEquals(parser.parse(treeString1).toString(), "(" + treeString1 + ")"); }