/**
  * @return void
  */
 public function testExecute()
 {
     $customerId = 1;
     $observerMock = $this->getMock('Magento\\Framework\\Event\\Observer', [], [], '', false);
     $eventMock = $this->getMock('Magento\\Framework\\Event', ['getData'], [], '', false);
     $observerMock->expects($this->once())->method('getEvent')->willReturn($eventMock);
     $eventMock->expects($this->once())->method('getData')->with('model')->willReturn($this->customerModelMock);
     $this->customerModelMock->expects($this->once())->method('getId')->willReturn($customerId);
     $this->customerRepositoryMock->expects($this->once())->method('getById')->willReturn($this->customerDataMock);
     $this->customerDataMock->expects($this->once())->method('getId')->willReturn($customerId);
     $this->accountManagementHelperMock->expects($this->once())->method('processUnlockData')->with($customerId);
     $this->customerRepositoryMock->expects($this->once())->method('save')->with($this->customerDataMock);
     $this->customerLoginSuccessObserver->execute($observerMock);
 }
 /**
  * @return void
  */
 public function testExecute()
 {
     $username = '******';
     $customerId = 1;
     $observerMock = $this->getMock('Magento\\Framework\\Event\\Observer', [], [], '', false);
     $eventMock = $this->getMock('Magento\\Framework\\Event', ['getData'], [], '', false);
     $observerMock->expects($this->once())->method('getEvent')->willReturn($eventMock);
     $eventMock->expects($this->once())->method('getData')->with('username')->willReturn($username);
     $this->customerRepositoryMock->expects($this->once())->method('get')->with($username)->willReturn($this->customerData);
     $this->customerData->expects($this->exactly(2))->method('getId')->willReturn($customerId);
     $this->accountManagementHelperMock->expects($this->once())->method('processCustomerLockoutData')->with($customerId);
     $this->customerRepositoryMock->expects($this->once())->method('save')->with($this->customerData);
     $this->observer->execute($observerMock);
 }