AccountService { public BigDecimal withdraw(Long id, BigDecimal amount) { return deposit(id, amount.negate()); }  @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) BigDecimal getBalance(Long id); BigDecimal deposit(Long id, BigDecimal amount); BigDecimal withdraw(Long id, BigDecimal amount); void transfer(Long fromId, Long toId, BigDecimal amount);  }
@Test public void testWithdraw() throws Exception { BigDecimal start = service.getBalance(1L); BigDecimal amount = new BigDecimal("50.0"); service.withdraw(1L, amount); BigDecimal finish = start.subtract(amount); assertThat(finish, is(closeTo(service.getBalance(1L), new BigDecimal("0.01")))); }