private void setupTestState() throws IOException, StoreException {
    StoreMetrics metrics = new StoreMetrics(clusterMap.getMetricRegistry());
    long expiryTimeMs = time.milliseconds() + TimeUnit.SECONDS.toMillis(TestUtils.TTL_SECS);
    temporaryPutExpiryTimeMs =
        Utils.getTimeInMsToTheNearestSec(SystemTime.getInstance().milliseconds() + TimeUnit.DAYS.toMillis(1));
    BlobStore src = new BlobStore(replicaId, replicaId.getPartitionId().toString(), storeConfig, null, null, null,
        DISK_IO_SCHEDULER,
        StoreTestUtils.DEFAULT_DISK_SPACE_ALLOCATOR, metrics, metrics, srcDir.getAbsolutePath(), STORE_CAPACITY,
        STORE_KEY_FACTORY, null, null, null, time, null, null, null, null);
    src.start();
    try {
      short accountId = Utils.getRandomShort(TestUtils.RANDOM);
      short containerId = Utils.getRandomShort(TestUtils.RANDOM);
      putAndTtlUpdatedId = new MockId("putAndTtlUpdatedId", accountId, containerId);
      putAndTtlUpdatedData =
          addMessage(src, putAndTtlUpdatedId, expiryTimeMs, false, false, accountId, containerId, time.milliseconds());
      putTtlUpdatedAndDeletedId = new MockId("putTtlUpdatedAndDeletedId", accountId, containerId);
      addMessage(src, putTtlUpdatedAndDeletedId, expiryTimeMs, false, false, accountId, containerId,
          time.milliseconds());
      temporaryPutId = new MockId("temporaryPutId", accountId, containerId);
      temporaryPutData = addMessage(src, temporaryPutId, temporaryPutExpiryTimeMs, false, false, accountId, containerId,
          time.milliseconds());
      deletedId = new MockId("deletedId", accountId, containerId);
      addMessage(src, deletedId, Utils.Infinite_Time, false, false, accountId, containerId, time.milliseconds());
      permanentPutId = new MockId("permanentPutId", accountId, containerId);
      permanentPutData = addMessage(src, permanentPutId, Utils.Infinite_Time, false, false, accountId, containerId,
          time.milliseconds());
      addMessage(src, putAndTtlUpdatedId, Utils.Infinite_Time, false, true, accountId, containerId,
          time.milliseconds());
      addMessage(src, putTtlUpdatedAndDeletedId, Utils.Infinite_Time, false, true, accountId, containerId,
          time.milliseconds());
      addMessage(src, deletedId, Utils.Infinite_Time, true, false, accountId, containerId, time.milliseconds());
      addMessage(src, putTtlUpdatedAndDeletedId, Utils.Infinite_Time, true, true, accountId, containerId,
          time.milliseconds());
      expiredId = new MockId("expiredId", accountId, containerId);
      addMessage(src, expiredId, 0, false, false, accountId, containerId, time.milliseconds());
    } finally {
      src.shutdown();
    }
  }
Sets up some test state required to verify the copy.
@throws IOException
@throws StoreException
ambry-tools/src/test/java/com/github/ambry/store/StoreCopierTest.java