### Question:
KeyPairVerifier { public static void verify(String privateKeyPem, String publicKeyPem) throws VerificationException { PrivateKey privateKey; try { privateKey = PemUtils.decodePrivateKey(privateKeyPem); } catch (Exception e) { throw new VerificationException("Failed to decode private key"); } PublicKey publicKey; try { publicKey = PemUtils.decodePublicKey(publicKeyPem); } catch (Exception e) { throw new VerificationException("Failed to decode public key"); } try { String jws = new JWSBuilder().content("content".getBytes()).rsa256(privateKey); if (!RSAProvider.verify(new JWSInput(jws), publicKey)) { throw new VerificationException("Keys don't match"); } } catch (Exception e) { throw new VerificationException("Keys don't match"); } }  static void verify(String privateKeyPem, String publicKeyPem);  }### Answer:
@Test public void verify() throws Exception { KeyPairVerifier.verify(privateKey1, publicKey1); KeyPairVerifier.verify(privateKey2048, publicKey2048); try { KeyPairVerifier.verify(privateKey1, publicKey2048); Assert.fail("Expected VerificationException"); } catch (VerificationException e) { } try { KeyPairVerifier.verify(privateKey2048, publicKey1); Assert.fail("Expected VerificationException"); } catch (VerificationException e) { } }