private static ColdBucketCopier createColdBucketCopier(ShuttlServerMBean serverMBean) {
    CallCopyBucketEndpoint callCopyBucketEndpoint = CallCopyBucketEndpoint.create(serverMBean);
    LocalFileSystemPaths fileSystemPaths = LocalFileSystemPaths.create();

    CopyBucketReceipts receipts = new CopyBucketReceipts(fileSystemPaths);
    ColdBucketCopier coldBucketCopier =
        new ColdBucketCopier(
            new ColdBucketInterator(EntryPointUtil.getSplunkService(), new BucketIteratorFactory()),
            receipts,
            new LockedBucketCopier(
                new CopyBucketLocker(fileSystemPaths), callCopyBucketEndpoint, receipts));

    return coldBucketCopier;
  }
  private static void execute(File bucketDir) throws FileNotFoundException {
    String indexName = EntryPointUtil.getIndexNameForBucketDir(bucketDir);

    callCopyBucketEndpointWithBucket(indexName);
  }