protected function compareLeave(Leave $expected, Leave $result)
 {
     $this->assertTrue($result instanceof Leave);
     $expectedId = $expected->getId();
     if (!empty($expectedId)) {
         $this->assertEquals($expectedId, $result->getId());
     } else {
         $leaveId = $result->getId();
         $this->assertTrue(!empty($leaveId));
     }
     $this->assertEquals($expected->getLeaveTypeId(), $result->getLeaveTypeId());
     $this->assertEquals($expected->getDate(), $result->getDate());
     $this->assertEquals($expected->getEmpNumber(), $result->getEmpNumber());
     $this->assertEquals($expected->getComments(), $result->getComments());
     $this->assertEquals($expected->getLengthHours(), $result->getLengthHours());
     $this->assertEquals($expected->getLengthDays(), $result->getLengthDays());
     $this->assertEquals($expected->getStatus(), $result->getStatus());
     $this->assertEquals($expected->getLeaveRequestId(), $result->getLeaveRequestId());
 }