private BlobStorageException mockStorageException(BlobErrorCode errorCode) {
    BlobStorageException mockException = mock(BlobStorageException.class);
    lenient().when(mockException.getErrorCode()).thenReturn(errorCode);
    return mockException;
  }
@return a {@link BlobStorageException} with given error code.
@param errorCode the {@link BlobErrorCode} to return.
ambry-cloud/src/test/java/com/github/ambry/cloud/azure/AzureStorageCompactorTest.java