File f = new File("samples/shakespeare/hamlet.xml");
String existHome = System.getProperty("exist.home"); File existDir = existHome==null ? new File(".") : new File(existHome); File f = new File(existDir,"samples/shakespeare/hamlet.xml");
	protected void setUp() {		if (uri.startsWith("xmldb:exist://localhost"))			initServer();		try {			// initialize driver			Class cl = Class.forName("org.exist.xmldb.DatabaseImpl");			Database database = (Database) cl.newInstance();			database.setProperty("create-database", "true");			DatabaseManager.registerDatabase(database);						Collection root =				DatabaseManager.getCollection(						uri,						"admin",						null);			CollectionManagementService service =				(CollectionManagementService) root.getService(						"CollectionManagementService",				"1.0");			testCollection = service.createCollection("test");			assertNotNull(testCollection);						Resource r = testCollection.createResource("hamlet.xml", "XMLResource");			File f = new File("samples/shakespeare/hamlet.xml");			r.setContent(f);			testCollection.storeResource(r);		} catch (ClassNotFoundException e) {		} catch (InstantiationException e) {		} catch (IllegalAccessException e) {		} catch (XMLDBException e) {			e.printStackTrace();		}	}