wait(2000);
wait(250);
        public void run() {            for (int i = 0; i < 10; i++) {                try {                    XmldbURI sourceColl = XmldbURI.ROOT_COLLECTION_URI.append("source" + i);                    XmldbURI targetColl1 = XmldbURI.ROOT_COLLECTION_URI.append("target");                    XmldbURI targetColl2 = targetColl1.append("test" + i);                    XmldbURI sourceResource = sourceColl.append("source.xml");                    XmldbURI targetResource = targetColl2.append("copied.xml");                    System.out.println("Creating collections ...");                    XmlRpcClient xmlrpc = getClient();                    createCollection(xmlrpc, sourceColl);                    createCollection(xmlrpc, targetColl1);                    createCollection(xmlrpc, targetColl2);                    System.out.println("Storing document ...");                    Vector params = new Vector();                    params.addElement(readData());                    params.addElement(sourceResource.toString());                    params.addElement(new Integer(1));                    Boolean result = (Boolean)xmlrpc.execute("parse", params);                    assertTrue(result.booleanValue());                    System.out.println("Document stored.");                    System.out.println("Moving resource ...");                    params.clear();                    params.addElement(sourceResource.toString());                    params.addElement(targetColl2.toString());                    params.addElement("copied.xml");                    xmlrpc.execute( "moveResource", params );                    System.out.println("Retrieving document " + targetResource);                    Hashtable options = new Hashtable();                    options.put("indent", "yes");                    options.put("encoding", "UTF-8");                    options.put("expand-xincludes", "yes");                    options.put("process-xsl-pi", "no");                    params.clear();                    params.addElement( targetResource.toString() );                    params.addElement( options );                    byte[] data = (byte[]) xmlrpc.execute( "getDocument", params );//                    System.out.println( new String(data, "UTF-8") );                    synchronized (this) {                        wait(2000);                    }                    System.out.println("Removing created collections ...");                    params.clear();                    params.addElement(sourceColl.toString());                    xmlrpc.execute("removeCollection", params);                    params.setElementAt(targetColl1.toString(), 0);                    xmlrpc.execute("removeCollection", params);                    System.out.println("Collections removed.");                } catch (Exception e) {                    e.printStackTrace();                    fail(e.getMessage());                }            }        }