test_class.declarator: transactionsService = mock(TransactionsService.class)
test_class.modifier: private final
test_class.original_string: private final TransactionsService transactionsService = mock(TransactionsService.class);
test_class.type: TransactionsService
test_class.var_name: transactionsService
test_class.declarator: service = new ReportsService(transactionsService)
test_class.modifier: private final
test_class.original_string: private final ReportsService service = new ReportsService(transactionsService);
test_class.type: ReportsService
test_class.var_name: service
test_class.declarator: transactions = createTransactions()
test_class.modifier: private
test_class.original_string: private Transactions transactions = createTransactions();
test_class.type: Transactions
test_class.var_name: transactions
test_class.file: services/src/test/java/com/greensopinion/finance/services/reports/ReportsServiceTest.java
test_class.identifier: ReportsServiceTest
test_case.body: @Test
  	public void incomeVersusExpenses() {
  		IncomeVersusExpensesReport report = service.incomeVersusExpenses();
  		List<Month> months = report.getMonths();
  		assertNotNull(months);
  		assertEquals(2, months.size());
  		assertMonth("January 2015", 102300, 1500, months.get(0));
  		assertMonth("February 2015", 0, 12345, months.get(1));
  	}
test_case.class_method_signature: ReportsServiceTest.incomeVersusExpenses()
test_case.full_signature: @Test public void incomeVersusExpenses()
test_case.identifier: incomeVersusExpenses
test_case.invocations: incomeVersusExpenses getMonths assertNotNull assertEquals size assertMonth get assertMonth get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void incomeVersusExpenses()
focal_class.declarator: yearMonthFormat = new ThreadLocal<DateFormat>() {
  		@Override
  		protected DateFormat initialValue() {
  			return new SimpleDateFormat("yyyyMM");
  		}
  	}
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<DateFormat> yearMonthFormat = new ThreadLocal<DateFormat>() {
  		@Override
  		protected DateFormat initialValue() {
  			return new SimpleDateFormat("yyyyMM");
  		}
  	};
focal_class.type: ThreadLocal<DateFormat>
focal_class.var_name: yearMonthFormat
focal_class.declarator: readableYearMonthFormat = new ThreadLocal<DateFormat>() {
  		@Override
  		protected DateFormat initialValue() {
  			return new SimpleDateFormat("MMMMMMMMMMM yyyy");
  		}
  	}
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<DateFormat> readableYearMonthFormat = new ThreadLocal<DateFormat>() {
  		@Override
  		protected DateFormat initialValue() {
  			return new SimpleDateFormat("MMMMMMMMMMM yyyy");
  		}
  	};
focal_class.type: ThreadLocal<DateFormat>
focal_class.var_name: readableYearMonthFormat
focal_class.declarator: transactionsService
focal_class.modifier: private final
focal_class.original_string: private final TransactionsService transactionsService;
focal_class.type: TransactionsService
focal_class.var_name: transactionsService
focal_class.file: services/src/main/java/com/greensopinion/finance/services/reports/ReportsService.java
focal_class.identifier: ReportsService
focal_class.class_method_signature: ReportsService.ReportsService(TransactionsService transactionsService)
focal_class.full_signature: @Inject  ReportsService(TransactionsService transactionsService)
focal_class.identifier: ReportsService
focal_class.modifiers: @Inject
focal_class.parameters: (TransactionsService transactionsService)
focal_class.signature:  ReportsService(TransactionsService transactionsService)
focal_class.class_method_signature: ReportsService.incomeVersusExpenses()
focal_class.full_signature: public IncomeVersusExpensesReport incomeVersusExpenses()
focal_class.identifier: incomeVersusExpenses
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IncomeVersusExpensesReport
focal_class.signature: IncomeVersusExpensesReport incomeVersusExpenses()
focal_class.class_method_signature: ReportsService.expensesByCategory()
focal_class.full_signature: public ExpensesByCategoryReport expensesByCategory()
focal_class.identifier: expensesByCategory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ExpensesByCategoryReport
focal_class.signature: ExpensesByCategoryReport expensesByCategory()
focal_class.class_method_signature: ReportsService.transactionsForMonth(long yearMonth)
focal_class.full_signature: public PeriodTransactions transactionsForMonth(long yearMonth)
focal_class.identifier: transactionsForMonth
focal_class.modifiers: public
focal_class.parameters: (long yearMonth)
focal_class.return: PeriodTransactions
focal_class.signature: PeriodTransactions transactionsForMonth(long yearMonth)
focal_class.class_method_signature: ReportsService.detailsForMonth(long yearMonth)
focal_class.full_signature: public PeriodDetails detailsForMonth(long yearMonth)
focal_class.identifier: detailsForMonth
focal_class.modifiers: public
focal_class.parameters: (long yearMonth)
focal_class.return: PeriodDetails
focal_class.signature: PeriodDetails detailsForMonth(long yearMonth)
focal_class.class_method_signature: ReportsService.transactions(long yearMonth)
focal_class.full_signature: private List<Transaction> transactions(long yearMonth)
focal_class.identifier: transactions
focal_class.modifiers: private
focal_class.parameters: (long yearMonth)
focal_class.return: List<Transaction>
focal_class.signature: List<Transaction> transactions(long yearMonth)
focal_class.class_method_signature: ReportsService.monthName(final Long yearMonth)
focal_class.full_signature: private String monthName(final Long yearMonth)
focal_class.identifier: monthName
focal_class.modifiers: private
focal_class.parameters: (final Long yearMonth)
focal_class.return: String
focal_class.signature: String monthName(final Long yearMonth)
focal_class.class_method_signature: ReportsService.yearMonth(Date date)
focal_class.full_signature: private Long yearMonth(Date date)
focal_class.identifier: yearMonth
focal_class.modifiers: private
focal_class.parameters: (Date date)
focal_class.return: Long
focal_class.signature: Long yearMonth(Date date)
focal_class.class_method_signature: ReportsService.yearMonthFormat()
focal_class.full_signature: private DateFormat yearMonthFormat()
focal_class.identifier: yearMonthFormat
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: DateFormat
focal_class.signature: DateFormat yearMonthFormat()
focal_class.class_method_signature: ReportsService.readableYearMonthFormat()
focal_class.full_signature: private DateFormat readableYearMonthFormat()
focal_class.identifier: readableYearMonthFormat
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: DateFormat
focal_class.signature: DateFormat readableYearMonthFormat()
focal_method.body: public IncomeVersusExpensesReport incomeVersusExpenses() {
  		IncomeVersusExpensesReport report = new IncomeVersusExpensesReport();
  
  		Transactions transactions = transactionsService.retrieve();
  
  		ListMultimap<Long, Transaction> transactionsByMonth = ArrayListMultimap.create();
  		for (Transaction transaction : transactions.getTransactions()) {
  			Long yearMonth = yearMonth(transaction.getDate());
  			transactionsByMonth.put(yearMonth, transaction);
  		}
  		List<Long> sortedMonths = new ArrayList<>(transactionsByMonth.keySet());
  		Collections.sort(sortedMonths);
  		for (final Long yearMonth : sortedMonths) {
  			String name = monthName(yearMonth);
  			report.addMonth(new Month(yearMonth, name, transactionsByMonth.get(yearMonth)));
  		}
  		return report;
  	}
focal_method.class_method_signature: ReportsService.incomeVersusExpenses()
focal_method.full_signature: public IncomeVersusExpensesReport incomeVersusExpenses()
focal_method.identifier: incomeVersusExpenses
focal_method.invocations: retrieve create getTransactions yearMonth getDate put keySet sort monthName addMonth get
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: IncomeVersusExpensesReport
focal_method.signature: IncomeVersusExpensesReport incomeVersusExpenses()