@Test
  public void testSerdeException() throws ExecutionException, InterruptedException {
    final String blobId = "foo";

    final BlobStoreManager testBlobStoreManager = new DeserTestBlobStoreManager();
    final BlobStoreUtil util = new BlobStoreUtil(testBlobStoreManager, Executors.newSingleThreadExecutor(), blobStoreConfig, null, null);

    final CompletableFuture<SnapshotIndex> future = util.getSnapshotIndex(blobId, mock(Metadata.class), true)
        .handle((snapshotIndex, throwable) -> {
          if (throwable != null) {
            Assert.assertEquals(throwable.getMessage(), String.format("Unable to get SnapshotIndex blob. The blob ID is : %s", blobId));
            Assert.assertEquals(throwable.getCause().getMessage(), "org.apache.samza.SamzaException: Exception in deserializing SnapshotIndex bytes foobar");
          }
          return snapshotIndex;
        });
    future.get();
  }
Tests related to {@link BlobStoreUtil#getStoreSnapshotIndexes}
samza-core/src/test/java/org/apache/samza/storage/blobstore/util/TestBlobStoreUtil.java