private void testFailureOnEncryption(SecretKeySpec perBlobKey, CryptoService cryptoService, KeyManagementService kms)
      throws InterruptedException {
    TestBlobData testData = getRandomBlob(referenceClusterMap);
    CountDownLatch encryptCallBackCount = new CountDownLatch(1);
    cryptoJobHandler.submitJob(
        new EncryptJob(testData.blobId.getAccountId(), testData.blobId.getContainerId(), testData.blobContent,
            testData.userMetadata, perBlobKey, cryptoService, kms, null,
            new CryptoJobMetricsTracker(routerMetrics.encryptJobMetrics),
            new EncryptCallbackVerifier(testData.blobId, true, encryptCallBackCount, null, Mode.Both)));
    awaitCountDownLatch(encryptCallBackCount, ENCRYPT_JOB_TYPE);
  }
Test failure during encryption
@param perBlobKey the {@link SecretKeySpec} representing the per blob key
@throws InterruptedException
ambry-router/src/test/java/com/github/ambry/router/CryptoJobHandlerTest.java