/**
  * @expectedException \DomainException
  * @dataProvider deleteStorageDataProvider
  */
 public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCountAfterDeletion)
 {
     $backend = $this->backendService->getBackend('identifier:\\OCA\\Files_External\\Lib\\Backend\\SMB');
     $authMechanism = $this->backendService->getAuthMechanism('identifier:\\Auth\\Mechanism');
     $storage = new StorageConfig(255);
     $storage->setMountPoint('mountpoint');
     $storage->setBackend($backend);
     $storage->setAuthMechanism($authMechanism);
     $storage->setBackendOptions($backendOptions);
     $newStorage = $this->globalStoragesService->addStorage($storage);
     $id = $newStorage->getId();
     $this->service->removeStorage($id);
 }