}
}
private void archiveBucketAndThawItBack_assertThawedBucketHasSameNameAsFrozenBucket(
ArchivesBucket archivesBucket) throws Exception {
LocalBucket bucketToFreeze = TUtilsBucket.createBucketInDirectoryWithIndex(
splunkIndexesLayer.getColdLocation(thawIndex), thawIndex);
Date earliest = bucketToFreeze.getEarliest();
Date latest = bucketToFreeze.getLatest();
assertEquals(earliest, bucketToFreeze.getEarliest());
assertEquals(latest, bucketToFreeze.getLatest());
archivesBucket.archiveBucket(bucketToFreeze);
verifyFreezeByListingBucketInArchive(bucketToFreeze);
boolean bucketToFreezeExists = bucketToFreeze.getDirectory().exists();
assertFalse(bucketToFreezeExists);
assertTrue(isThawDirectoryEmpty());
callRestToThawBuckets(thawIndex, earliest, latest);
assertFalse(isThawDirectoryEmpty());
File[] listFiles = thawDirectoryLocation.listFiles();
assertEquals(1, listFiles.length);
File thawedBucket = listFiles[0];
assertEquals(bucketToFreeze.getName(), thawedBucket.getName());
}