@Test
public void testInvalidateTimeBucket() throws IOException
{

  testMeta.bucketsFileSystem.setup(testMeta.managedStateContext);
  testGetAllTimeBucketMeta();
  testMeta.bucketsFileSystem.invalidateTimeBucket(1, 1);
  BucketsFileSystem.TimeBucketMeta immutableTbm = testMeta.bucketsFileSystem.getTimeBucketMeta(1,1);
  Assert.assertNull("deleted tbm", immutableTbm);
  TreeMap<Long, BucketsFileSystem.TimeBucketMeta> timeBucketMetas =
      testMeta.bucketsFileSystem.getAllTimeBuckets(1);
  Assert.assertEquals("only 1 tbm", 1, timeBucketMetas.size());
  immutableTbm = timeBucketMetas.entrySet().iterator().next().getValue();
  Assert.assertEquals("tbm 2", 2, immutableTbm.getTimeBucketId());
  testMeta.bucketsFileSystem.teardown();
}