String homeDir = System.getProperty("exist.home");
String homeDir = Configuration.getPath();
    protected void setUp() {        String homeDir = System.getProperty("exist.home");		if (homeDir == null)			homeDir = ".";        File testDir = new File(homeDir + File.separatorChar + "test");        if (!testDir.canWrite())            testDir.mkdirs();        try {	        // initialize database drivers	        Class cl = Class.forName("org.exist.xmldb.DatabaseImpl");	        for (int i = 0; i < INSTANCE_COUNT; i++) {	            File dir = new File(testDir, "db" + i);	            dir.mkdirs();	            File conf = new File(dir, "conf.xml");	            FileOutputStream os = new FileOutputStream(conf);	            os.write(CONFIG.getBytes("UTF-8"));	            os.close();	            	            Database database = (Database) cl.newInstance();	            database.setProperty("create-database", "true");	            database.setProperty("configuration", conf.getAbsolutePath());	            database.setProperty("database-id", "test" + i);	            DatabaseManager.registerDatabase(database);	        }        } catch (Exception e) {                        fail(e.getMessage());         }    }