@RequestMapping(DepartmentServiceConfig.DEPARTMENT_SERVICE_PATHTO_LIST_EMPLOYEE)
  public Page<Employee> listEmployeesOfDepartment(@PathVariable("id") String id, Pageable page) {
    List<Employee> departments = departmentService.listEmployeesOfDepartment(id, page);

    Page<Employee> result = new PageImpl<Employee>(departments);

    return result;
  }
  @RequestMapping(DepartmentServiceConfig.DEPARTMENT_SERVICE_PATHTO_LIST_DEPARTMENTS)
  Page<DepartmentResource> listDepartments(Pageable page) {
    List<DepartmentResource> departments = departmentService.listDepartments(page);

    Page<DepartmentResource> result = new PageImpl<DepartmentResource>(departments);

    return result;
  }
  @RequestMapping(DepartmentServiceConfig.DEPARTMENT_SERVICE_PATHTO_LIST_DEPARTMENTS_CONTAINING_ID)
  public Page<DepartmentResource> listDepartmentsIdContaints(
      @RequestParam("id") String id, Pageable page) {
    List<DepartmentResource> departments = departmentService.listDepartmentsIdContaints(id, page);

    Page<DepartmentResource> result = new PageImpl<DepartmentResource>(departments);

    return result;
  }
  @RequestMapping(DepartmentServiceConfig.DEPARTMENT_SERVICE_PATHTO_DEAPRTMENT)
  public DepartmentResource findDepartmentsById(@PathVariable("id") String id) {

    return departmentService.findDepartmentById(id);
  }