XmlListener listener = null; listener = (XmlListener) deploy.sfResolve(TestRunner.ATTR_LISTENER, listener,
XmlListenerFactory listenerFactory = null; listenerFactory = (XmlListenerFactory) deploy.sfResolve( TestRunner.ATTR_LISTENER, listenerFactory,
    public void testSuccess() throws Throwable {        String url;        Prim deploy = null;        url = "/files/xml-all.sf";        final String appName = "XmlTest";        int seconds = getTimeout();        try {            deploy = deployExpectingSuccess(url, appName);            TestRunner runner = (TestRunner) deploy;            assertTrue(runner != null);            XmlListener listener = null;            listener =                    (XmlListener) deploy.sfResolve(TestRunner.ATTR_LISTENER,                            listener,                            true);            boolean finished = spinTillFinished(runner, seconds);            assertTrue("Test run timed out", finished);            Statistics statistics = runner.getStatistics();            assertEquals("statistics.testRun==1", 1, statistics.getTestsRun());            assertEquals("statistics.errors==0", 0, statistics.getErrors());            assertEquals("statistics.failures==0",                    0,                    statistics.getFailures());            //TODO: more tests        } finally {            terminateApplication(deploy);        }    }