 
         switch cardManager.publishCard(rawCard: rawCard2).startSync() {
         case .success: XCTFail()
-        case .failure: break
+        case .failure(let error):
+            guard let error = error as? CardManagerError,
+                error == .gotWrongCard else {
+                    XCTFail()
+                    return
+            }
         }
     }
     

        self.utils = VSSTestUtils(crypto: self.crypto, consts: self.consts)
        self.cardCrypto = VirgilCardCrypto(virgilCrypto: self.crypto)
        self.modelSigner = ModelSigner(cardCrypto: self.cardCrypto)
    }

    override func tearDown() {

import VirgilCryptoApiImpl
import VirgilSDK

class CardClientStub_STC34: CardClientProtocol {
    private var testsDict: Dictionary<String, Any>!

