broker.saveCollection(transaction, collection);  transact.commit(transaction); System.out.println("Transaction commited ...");
    public void testRead() {        BrokerPool.FORCE_CORRUPTION = false;        BrokerPool pool = startDB();                System.out.println("testRead() ...\n");                DBBroker broker = null;                        byte[] data = null;                try {            broker = pool.get(SecurityManager.SYSTEM_USER);                        String docPath = TEST_COLLECTION + "/" + DOCUMENT_NAME;                        BinaryDocument binDoc = (BinaryDocument) broker                    .getXMLResource(docPath, Lock.READ_LOCK);                        // if document is not present, null is returned            if(binDoc == null){                fail("Binary document '" + docPath + " does not exist.");            } else {                data = broker.getBinaryResource(binDoc);                binDoc.getUpdateLock().release(Lock.READ_LOCK);            }                                } catch (Exception ex){            fail("Error opening document" + ex);                    } finally {            if(pool!=null){                pool.release(broker);            }        }                assertEquals(0, data.length);    }