@Test(expected = SamzaException.class)
  public void testGetSSIThrowsExceptionOnSyncBlobStoreErrors() {
    Checkpoint checkpoint = createCheckpointV2(BlobStoreStateBackendFactory.class.getName(),
        ImmutableMap.of("storeName", "snapshotIndexBlobId"));
    Set<String> storesToBackupOrRestore = new HashSet<>();
    storesToBackupOrRestore.add("storeName");
    BlobStoreUtil mockBlobStoreUtil = mock(BlobStoreUtil.class);
    when(mockBlobStoreUtil.getSnapshotIndex(anyString(), any(Metadata.class), anyBoolean())).thenThrow(new RuntimeException());
    when(mockBlobStoreUtil.getStoreSnapshotIndexes(anyString(), anyString(), anyString(),
        any(Checkpoint.class), anySetOf(String.class), any(Boolean.class))).thenCallRealMethod();
    mockBlobStoreUtil.getStoreSnapshotIndexes("testJobName", "testJobId", "taskName",
        checkpoint, storesToBackupOrRestore, false);
  }
Tests related to {@link BlobStoreUtil#getStoreSnapshotIndexes}
samza-core/src/test/java/org/apache/samza/storage/blobstore/util/TestBlobStoreUtil.java