File f = new File("samples/shakespeare/r_and_j.xml");
String existHome = System.getProperty("exist.home"); File existDir = existHome==null ? new File(".") : new File(existHome); File f = new File(existDir,"samples/shakespeare/r_and_j.xml");
	public void testStore() {		BrokerPool.FORCE_CORRUPTION = true;		BrokerPool pool = null;		DBBroker broker = null;		try {			pool = startDB();			assertNotNull(pool);			broker = pool.get(SecurityManager.SYSTEM_USER);			assertNotNull(broker);			TransactionManager transact = pool.getTransactionManager();			assertNotNull(transact);			Txn transaction = transact.beginTransaction();			assertNotNull(transaction);			System.out.println("Transaction started ...");			Collection root = broker.getOrCreateCollection(transaction,	TestConstants.TEST_COLLECTION_URI);			assertNotNull(root);			broker.saveCollection(transaction, root);			Collection test2 = broker.getOrCreateCollection(transaction,TestConstants.TEST_COLLECTION_URI2);			assertNotNull(test2);			broker.saveCollection(transaction, test2);			File f = new File("samples/shakespeare/r_and_j.xml");			assertNotNull(f);			IndexInfo info = test2.validateXMLResource(transaction, broker, TestConstants.TEST_XML_URI, new InputSource(f.toURI().toASCIIString()));			assertNotNull(info);			test2.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);			            System.out.println("Moving document test.xml to new_test.xml ...");			broker.moveXMLResource(transaction, info.getDocument(), root, XmldbURI.create("new_test.xml"));			broker.saveCollection(transaction, root);            			transact.commit(transaction);			System.out.println("Transaction commited ...");		} catch (Exception e) {            	        fail(e.getMessage());  					} finally {			pool.release(broker);		}	}