public void checkTransfer(BigDecimal amountToTransfer) throws WalletIsBlockedException, LimitExceededException {
if (status == WalletStatus.BLOCKED) {
throw new WalletIsBlockedException(id, "Wallet " + id + " is blocked.");
}
if (maxAmount.compareTo(amount.add(amountToTransfer)) < 0) {
throw new LimitExceededException(id, amountToTransfer, amount, "Limit exceeded (" +
MoneyFormatter.format(amount) + " + " + MoneyFormatter.format(amountToTransfer) +
" > " + MoneyFormatter.format(maxAmount) + ")");
}
}