public function testUpdateSubscription()
 {
     $customerId = 1;
     $customerDataMock = $this->getMockBuilder('\\Magento\\Customer\\Api\\Data\\CustomerInterface')->getMock();
     $this->customerRepository->expects($this->atLeastOnce())->method('getById')->with($customerId)->willReturn($customerDataMock);
     $this->resource->expects($this->atLeastOnce())->method('loadByCustomerData')->with($customerDataMock)->willReturn(['subscriber_id' => 1, 'subscriber_status' => 1]);
     $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
     $this->resource->expects($this->atLeastOnce())->method('save')->willReturnSelf();
     $this->customerAccountManagement->expects($this->once())->method('getConfirmationStatus')->with($customerId)->willReturn('account_confirmation_required');
     $customerDataMock->expects($this->once())->method('getStoreId')->willReturn('store_id');
     $customerDataMock->expects($this->once())->method('getEmail')->willReturn('email');
     $this->assertEquals($this->subscriber, $this->subscriber->updateSubscription($customerId));
 }