// ( [type 1] [type 2] ( [type 49] [type 3 #2] ) [type 3] )
AST x = factory.create(1,"[type 1]","MyAST"); // will be root
AST y = factory.create(2,"[type 2]","MyAST");
AST z = factory.create(3,"[type 3]","MyAST");
AST sub = factory.create(49,"[type 49]","ASTType49");
sub.addChild(factory.create(3,"[type 3 #2]","MyAST"));
AST t = factory.make(new AST[] {x,y,sub,z});
AST dup_t = factory.dupList(t);
// check structure
boolean a = dup_t.equalsList(t);
// check types