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

  testMeta.checkpointManager.setup(testMeta.managedStateContext);
  Map<Long, Map<Slice, Bucket.BucketedValue>> buckets5 = ManagedStateTestUtils.getTestData(0, 5, 0);
  testMeta.checkpointManager.save(buckets5, 10, false);
  //Need to synchronously call transfer window files so shutting down the other thread.
  testMeta.checkpointManager.teardown();
  Thread.sleep(500);
  testMeta.checkpointManager.committed(10);
  testMeta.checkpointManager.transferWindowFiles();
  for (int i = 0; i < 5; i++) {
    ManagedStateTestUtils.validateBucketOnFileSystem(testMeta.managedStateContext.getFileAccess(), i,
        buckets5.get((long)i), 1);
  }
}