@Test
  public void getAllDesignations() {
    sampleDesignation();
    final List<Designation> desigList = designationService.getAllDesignations();

    assertNotNull(desigList);
  }
  @Test
  public void getDesignationsContainingName() {
    sampleDesignation();
    final List<Designation> desigList =
        designationService.getAllDesignationsByNameLike("ASSISTANT");

    assertNotNull(desigList);
  }
  @Test
  public void updateDesignation() {
    sampleDesignation();
    designation.setDescription("FORTESTING");
    designationService.updateDesignation(designation);

    assertEquals("FORTESTING", designation.getDescription());
  }
 @Test
 public void getAllDesignationsForDepartment() {
   final List<Designation> desigList =
       designationService.getAllDesignationByDepartment(20l, new Date());
   assertNotNull(desigList);
 }
  @Test
  public void createDesignation() {
    sampleDesignation();

    assertEquals("ASSISTANT1", designationService.getDesignationByName("ASSISTANT1").getName());
  }
 private void sampleDesignation() {
   designation =
       new DesignationBuilder().withName("ASSISTANT1").withDescription("ASSISTANT1").build();
   designationService.createDesignation(designation);
 }