TaxCalculationRepository extends AbstractRepository<TaxCalculation> { public List<TaxCalculation> find(int year, int month, long jobExecutionId) { TypedQuery<TaxCalculation> byMonthAndYear = entityManager.createNamedQuery(TaxCalculation.FIND_BY_YEAR_AND_MONTH, TaxCalculation.class); byMonthAndYear.setParameter("year", year); byMonthAndYear.setParameter("month", month); byMonthAndYear.setParameter("jobExecutionId", jobExecutionId); return byMonthAndYear.getResultList(); }  List<Long> getUnprocessedEmployeeIds(long year, long month, long jobExecutionId); List<TaxCalculation> find(int year, int month, long jobExecutionId); List<TaxCalculation> findByEmployee(Employee employee); Money getSuccessSum(int year, int month); Money getFailedSum(int year, int month);  }
@Test public void testFind() { setupGigelAndIonel(); List<TaxCalculation> byYearAndMonth = taxCalculationRepository.find(2014, 1, 1L); assertThat(byYearAndMonth).containsOnly(gigelJanuary, ionelJanuary); }