TaxCalculationRepository extends AbstractRepository<TaxCalculation> { public List<TaxCalculation> findByEmployee(Employee employee) { TypedQuery<TaxCalculation> byEmployee = entityManager.createNamedQuery(TaxCalculation.FIND_BY_EMPLOYEE, TaxCalculation.class); byEmployee.setParameter("employeeId", employee.getId()); return byEmployee.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 testFindByEmployee() { setupGigelAndIonel(); List<TaxCalculation> byEmployee = taxCalculationRepository.findByEmployee(ionel); assertThat(byEmployee).containsOnly(ionelJanuary, ionelFebruary); }