@SuppressWarnings("unchecked")
private Money getBalanceUntilLastDay(String accountId, GDDate beginDate) {
beginDate.setHourOfDay(0);//(Calendar.HOUR_OF_DAY, 0);
beginDate.setMinuteOfHour(0);//(Calendar.MINUTE, 0);
try {
Map<String, Operation> operationsMap = (Map<String, Operation>) system.query(new GetOperationByAccountId(accountId));
//Foi necess�rio alterar os calculos para Money, pois estavammos com problemas de arredondamento.
// float balanceUntilLastDay = 0;
Money balanceUntilLastDayMoney = new Money(0.0);
for (Operation operation : operationsMap.values()) {