@Test
  public void checkLocalPartitionStatusTest() throws IOException {
    CloudStorageManager cloudStorageManager = createNewCloudStorageManager();
    ReplicaId mockReplicaId = clusterMap.getReplicaIds(clusterMap.getDataNodeIds().get(0)).get(0);
    PartitionId partitionId = mockReplicaId.getPartitionId();

    //try checkLocalPartitionStatus for a partition that doesn't exist
    Assert.assertEquals(
        cloudStorageManager.checkLocalPartitionStatus(partitionId, new MockReplicaId(ReplicaType.DISK_BACKED)),
        ServerErrorCode.NoError);

    //add and start a replica to the store
    Assert.assertTrue(cloudStorageManager.addBlobStore(mockReplicaId));

    //try checkLocalPartitionStatus for an added replica
    Assert.assertEquals(
        cloudStorageManager.checkLocalPartitionStatus(partitionId, new MockReplicaId(ReplicaType.DISK_BACKED)),
        ServerErrorCode.NoError);

    //stop a replica on the store
    Assert.assertTrue("Failed in stopping replica", cloudStorageManager.shutdownBlobStore(partitionId));

    //try checkLocalPartitionStatus for a stopped replica (stopped blob store)
    Assert.assertEquals(cloudStorageManager.checkLocalPartitionStatus(partitionId, mockReplicaId),
        ServerErrorCode.NoError);

    //try checkLocalPartitionStatus for a removed replica
    Assert.assertTrue(cloudStorageManager.removeBlobStore(partitionId));
    Assert.assertEquals(
        cloudStorageManager.checkLocalPartitionStatus(partitionId, new MockReplicaId(ReplicaType.DISK_BACKED)),
        ServerErrorCode.NoError);
  }
Test {@code CloudStorageManager#checkLocalPartitionStatus}
@throws IOException
ambry-vcr/src/test/java/com/github/ambry/vcr/CloudStorageManagerTest.java