DesignationService { public List<Designation> getAllDesignationByDepartment(Long id, Date givenDate) { return designationRepository.getAllDesignationsByDepartment(id, givenDate); }  @Transactional void createDesignation(Designation designation); @Transactional void updateDesignation(Designation designation); @Transactional void deleteDesignation(Designation designation); Designation getDesignationByName(String desName); Designation getDesignationById(Long desigId); List<Designation> getAllDesignations(); List<Designation> getAllDesignationsSortByNameAsc(); List<Designation> getAllDesignationsByNameLike(String name); List<Designation> getAllDesignationByDepartment(Long id, Date givenDate); List<Designation> getAllDesignationByDepartment(Long departmentId); Set<Role> getRolesByDesignation(String designationName); List<Designation> getDesignationsByNames(List<String> names); List<Designation> getDesignationsByName(String name);  }
@Test public void getAllDesignationsForDepartment() { final List<Designation> desigList = designationService.getAllDesignationByDepartment(20l, new Date()); assertNotNull(desigList); }