ExpenseCollection { public Long getTotalExpense(){ Long totalExpense = 0l; for (Expense expense : expenses) { totalExpense += expense.getAmount(); } return totalExpense; } ExpenseCollection(List<Expense> expenses); Long getTotalExpense(); Map<String, List<Expense>> groupByDate(); List<Expense> withoutMoneyTransfer();  }
@Test public void shouldReturnTotalExpense() throws Exception { assertThat(expenseCollection.getTotalExpense(), is(350l)); }