static HashMap[] generateTransactions(Class documentClass, int ownerId) throws Exception {
        int count = ownerId % 4;
        // make sure the first owner has an account
        if (ownerId == 0) {
            count = 3;
        }
        if (count == 0) {
            return null;
        }
        HashMap[] transactions = (HashMap[]) Array.newInstance(documentClass,count);
        transactions[0]= (HashMap) documentClass.newInstance();
        transactions[0].put("type","WITH".getBytes());
        transactions[0].put("timestamp",randomTimestamp());
        transactions[0].put("amount",randomInt(0,5000));
        if (count == 1) {
            return transactions;
        }
        transactions[1]= (HashMap) documentClass.newInstance();
        transactions[1].put("type","DEPO".getBytes());
        transactions[1].put("timestamp",randomTimestamp());
        transactions[1].put("amount",randomInt(0,5000));
        if (count == 2) {
            return transactions;
        }
        transactions[2]= (HashMap) documentClass.newInstance();
        transactions[2].put("type","TRNS".getBytes());
        transactions[2].put("timestamp",randomTimestamp());
        transactions[2].put("amount",randomInt(0,5000));
        return transactions;
    }