transaction.getAccountTransaction().getAccount().setId(1L);
transaction.getAccountTransaction().setAmount(BigDecimal.TEN);
transaction.getAccountTransaction().setOperationDate(DateUtils.getMidnight(new Date()));
transaction.getAccountTransaction().setSubcategory(new Subcategory());
transaction.getAccountTransaction().getSubcategory().setCategory("category.investment.buy");
double balance = account.calculateBalance().doubleValue();
investmentService.addInvestment(account.getOwner(), account, transaction, 11D);
assertNotNull("Transaction persisted", transaction.getId());
assertNotNull("Investment price persisted", transaction.getPrice().getId());
assertNotNull("Account transaction persisted", transaction.getAccountTransaction().getId());
assertEquals("One price available for the investment", new Double(2D), investment.getCurrentPrice());