public function testGetStoreIdWithPermanentRuleException()
 {
     $countryCode = 'UA';
     $storeId = 2;
     $ex = new \Exception('Permanent Rule Exception');
     $this->country->expects($this->once())->method('getCountryCode')->willReturn($countryCode);
     $this->rule->expects($this->once())->method('getStoreId')->with($countryCode)->willReturn($storeId);
     $this->permanentRule->expects($this->once())->method('updateStoreId')->with($storeId, $countryCode)->willThrowException($ex);
     $this->logger->expects($this->once())->method('critical')->with($ex);
     $this->assertFalse($this->switcher->isInitialized());
     $this->assertEquals($storeId, $this->switcher->getStoreId());
     $this->assertTrue($this->switcher->isInitialized());
 }