The following sample withdraws funds from an account. For the sample, it is assumed that an active account already exists.
// this sample assumes an active account already exists with the unique key (String) value equal to uniqueKey
protected AccountRepository accountRepository;
// Withdraw money from the account
BigDecimal used = new BigDecimal("100.000000000000");
//the third parameter is a String description of the withdrawal transaction
accountRepository.withdrawMoney(uniqueKey, used, "test allocating");