for (int i = 0; i < files.length && i < 2000; i++) {
for (int i = 0; i < files.length && i < 5000; i++) {
    public void testStore() throws Exception {        BrokerPool.FORCE_CORRUPTION = true;        BrokerPool pool = startDB();                DBBroker broker = null;        try {            broker = pool.get(SecurityManager.SYSTEM_USER);                        TransactionManager transact = pool.getTransactionManager();            Txn transaction = transact.beginTransaction();                        System.out.println("Transaction started ...");                        Collection root = broker.getOrCreateCollection(transaction, "/db/test");            broker.saveCollection(transaction, root);                        Collection test = broker.getOrCreateCollection(transaction, "/db/test/test2");            broker.saveCollection(transaction, test);                                    File files[] = dir.listFiles();                        File f;            IndexInfo info;                        // store some documents.            for (int i = 0; i < files.length && i < 2000; i++) {                f = files[i];                try {                    info = test.validate(transaction, broker, f.getName(), new InputSource(f.toURI().toASCIIString()));                    test.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);                } catch (SAXException e) {                    System.err.println("Error found while parsing document: " + f.getName() + ": " + e.getMessage());                }            }                        transact.commit(transaction);        } finally {            pool.release(broker);        }    }