executor.waitForIdle();
Metadata metadata = storage.encodeMetadata();
assertTrue(storage.getStatus() == Status.ENCODED);
Bucket mBucket1 = bigBucketFactory.makeBucket(-1);
DataOutputStream os = new DataOutputStream(mBucket1.getOutputStream());
metadata.writeTo(os);
os.close();
SplitFileInserterStorage resumed = new SplitFileInserterStorage(storage.getRAF(), data, cb, r,
memoryLimitedJobRunner, jobRunner, ticker, keys, fg, persistentFileTracker, null);
// Doesn't need to start since already encoded.
Metadata metadata2 = storage.encodeMetadata();