@Test
  public void testCompactionFailsOnCheckpointReadError() {
    BlobStorageException ex = mockStorageException(BlobErrorCode.INTERNAL_ERROR);
    when(mockBlockBlobAsyncClient.downloadWithResponse(any(), any(), any(), anyBoolean())).thenReturn(Mono.error(ex));
    try {
      azureStorageCompactor.compactPartition(partitionPath);
      fail("Expected compaction to fail");
    } catch (CloudStorageException cse) {
      // expected
    }
  }
Test compaction on error reading checkpoint.
ambry-cloud/src/test/java/com/github/ambry/cloud/azure/AzureStorageCompactorTest.java