@Test
public void expensesByCategory() {

	transactions = createTransactionsWithCategories();
	doReturn(transactions).when(transactionsService).retrieve();
	ExpensesByCategoryReport expensesByCategory = service.expensesByCategory();
	assertEquals("Monthly Expenses By Category", expensesByCategory.getTitle());
	List<PeriodDetails> months = expensesByCategory.getMonthlyDetails();
	assertNotNull(months);
	assertEquals(2, months.size());
	assertEquals("January 2015", months.get(0).getName());
	assertFalse(months.get(0).getCategories().isEmpty());
	assertEquals("March 2015", months.get(1).getName());
	assertFalse(months.get(1).getCategories().isEmpty());
}