setParameters(node, expar);
setExpected(node);
    public void traverse(Node node) {        int type = node.getNodeType();        if (type == Node.ELEMENT_NODE) {            if (node.getNodeName().equalsIgnoreCase("print")) {                // use System.err just to show this info                 // in different color in Eclipse console                System.err.println("[ "+node.getFirstChild().getNodeValue()+" ]");            } else if (node.getNodeName().equalsIgnoreCase("sleep")) {                int pause = Integer.parseInt(node.getFirstChild()                        .getNodeValue());                System.out.println("> Sleeping for "+pause+" ms.");                try {                    Thread.sleep(pause);                } catch (InterruptedException e) {                    e.printStackTrace();                }            } else if (node.getNodeName().equalsIgnoreCase("call")) {                sendfct = node.getAttributes().getNamedItem("method")                        .getNodeValue();                setParameters(node, sendpar);                try {                    System.out.println("> Calling GUI method " + sendfct                            + "[" + printParameters(sendpar) + "]");                    client.execute("gui." + sendfct, sendpar);                } catch (XmlRpcException e) {                    e.printStackTrace();                } catch (IOException e) {                    e.printStackTrace();                }            } else if (node.getNodeName().equalsIgnoreCase("expect")) {                expfct = node.getAttributes().getNamedItem("method")                        .getNodeValue();                setParameters(node, expar);                while (suspend) {                                    }                                if (expfct.equalsIgnoreCase(gotfct)) {                    if (parameterMatch()) {                        System.out.println("------- OK: Expected " + expfct                                + " and got it with proper parameter values. -------");                        suspend = true;                    } else {                        System.out.println("------- TEST FAILED: Expected " + expfct                                + "[" + printParameters(expar) + "], but got "                                + gotfct + "[" + printParameters(gotpar)                                + "]. Stop test. -------");                        System.exit(0);                    }                } else {                    System.out.println("------- TEST FAILED: Expected " + expfct                            + ", but got " + gotfct + ". Stop test. -------");                    System.exit(0);                }            }        }        NodeList children = node.getChildNodes();        if (children != null) {            for (int i = 0; i < children.getLength(); i++)                traverse(children.item(i));        }    }