@Test
public void testCommitted() throws IOException, InterruptedException
{

  CountDownLatch latch = new CountDownLatch(5);
  MockBucketsFileSystem mockBucketsFileSystem = new MockBucketsFileSystem(latch);
  testMeta.managedStateContext.setBucketsFileSystem(mockBucketsFileSystem);
  mockBucketsFileSystem.setup(testMeta.managedStateContext);
  testMeta.checkpointManager.setup(testMeta.managedStateContext);
  Map<Long, Map<Slice, Bucket.BucketedValue>> data = ManagedStateTestUtils.getTestData(0, 5, 0);
  testMeta.checkpointManager.save(data, 10, false);
  testMeta.checkpointManager.committed(10);
  latch.await();
  testMeta.checkpointManager.teardown();
  Thread.sleep(500);
  for (int i = 0; i < 5; i++) {
    ManagedStateTestUtils.validateBucketOnFileSystem(testMeta.managedStateContext.getFileAccess(), i,
        data.get((long)i), 1);
  }
}