EmployeeService implements EntityTypeService { public List<Employee> getEmployeesByType(final Long id) { return employeeRepository.findByEmployeeType_Id(id); } @Autowired  EmployeeService(final EmployeeRepository employeeRepository); Session getCurrentSession(); @SuppressWarnings("unchecked") List<CFunction> getAllFunctions(); @SuppressWarnings("unchecked") List<Functionary> getAllFunctionaries(); @SuppressWarnings("unchecked") List<Fund> getAllFunds(); @SuppressWarnings("unchecked") List<Fund> getAllGrades(); @Override @SuppressWarnings("unchecked") List<EntityType> getAllActiveEntities(final Integer employeeId); @Transactional void create(final Employee employee); @Transactional void createEmployeeData(final Employee employee); @Transactional void update(final Employee employee); @Transactional void updateEmployeeDetails(final Employee employee); @Transactional void addOrRemoveUserRole(); List<Employee> searchEmployees(final EmployeeSearchDTO searchParams); Query setParametersToQuery(final EmployeeSearchDTO searchParams, final Query query); Query setAssignmentParameter(final EmployeeSearchDTO searchParams, final Query assignQuery); @Transactional void delete(final Employee employee); Employee getEmployeeById(final Long id); Employee getEmployeeByCode(final String code); List<Employee> getEmployeesByStatus(final EmployeeStatus status); List<Employee> getEmployeesByType(final Long id); Employee getEmployeeByUserName(final String userName); List<Employee> findByDepartmentDesignationAndBoundary(final Long deptId, final Long desigId,
                                                                 final Long boundaryId); List<Employee> getEmployeesForPosition(final Long posId); Employee getPrimaryAssignmentEmployeeForPos(final Long posId); Employee getEmployeeForPositionAndDate(final Long posId, final Date givenDate); List<Employee> getAllEmployees(); @Override List<? extends EntityType> filterActiveEntities(final String filterKey, final int maxRecords,
                                                           final Integer accountDetailTypeId); @Override List getAssetCodesForProjectCode(final Integer accountdetailkey); @Override List<? extends EntityType> validateEntityForRTGS(final List<Long> idsList); @Override List<? extends EntityType> getEntitiesById(final List<Long> idsList); String generateUserNameByDeptDesig(final Department department, final Designation designation); List<Employee> findEmployeeByCodeLike(final String code); List<Employee> findActiveEmployeeByCodeLike(final String code); String validatePosition(final Employee employee, final String removedassignIds); Boolean validateEmployeeCode(final Employee employee); Boolean primaryAssignmentExists(final Employee employee); Boolean primaryAssignExistsForSamePeriod(final Employee employee); Boolean isPositionExistsInWF(String positionName, Boolean isPositionChanged, Date fromDate, Date toDate);  }
@Test public void getEmployeeByType() { final List<Employee> employees = employeeService.getEmployeesByType(1l); assertTrue(employees.size() > 1); }