VirgilCardCrypto { public byte[] exportPublicKey(VirgilPublicKey publicKey) throws CryptoException { if (publicKey == null) { throw new NullArgumentException("publicKey"); } return virgilCrypto.exportPublicKey(publicKey); } VirgilCardCrypto();  VirgilCardCrypto(VirgilCrypto virgilCrypto); byte[] exportPublicKey(VirgilPublicKey publicKey); byte[] computeSha512(byte[] data); byte[] generateSignature(byte[] data, VirgilPrivateKey privateKey); VirgilCrypto getVirgilCrypto(); VirgilPublicKey importPublicKey(byte[] data); boolean verifySignature(byte[] signature, byte[] data, VirgilPublicKey publicKey);  }
@Test public void exportPublicKey() throws CryptoException { byte[] keyData = this.cardCrypto.exportPublicKey(this.publicKey); assertNotNull(keyData); }
@Test public void exportPublicKey_null() { assertThrows(NullArgumentException.class, () -> { this.cardCrypto.exportPublicKey(null); }); }
@Test @Disabled public void exportPublicKey_wrongKey() { VirgilPublicKey key = new VirgilPublicKey() { }; assertThrows(CryptoException.class, () -> { this.cardCrypto.exportPublicKey(key); }); }