ReportsService { public PeriodTransactions transactionsForMonth(long yearMonth) { return new PeriodTransactions(monthName(yearMonth), transactions(yearMonth)); } @Inject  ReportsService(TransactionsService transactionsService); IncomeVersusExpensesReport incomeVersusExpenses(); ExpensesByCategoryReport expensesByCategory(); PeriodTransactions transactionsForMonth(long yearMonth); PeriodDetails detailsForMonth(long yearMonth);  }
@Test public void transactionsForMonth() { PeriodTransactions transactionsForMonth = service.transactionsForMonth(201502); assertEquals("February 2015", transactionsForMonth.getName()); assertEquals(1, transactionsForMonth.getTransactions().size()); assertTransaction(createTransactions().getTransactions().get(4), transactionsForMonth.getTransactions().get(0)); }