IncrementalCheckpointManager extends FSWindowDataManager implements ManagedStateComponent { @Override public void save(Object object, long windowId) throws IOException { throw new UnsupportedOperationException("doesn't support saving any object"); } IncrementalCheckpointManager(); @Override void setup(Context.OperatorContext context); @Override void setup(@NotNull final ManagedStateContext managedStateContext); @Override void save(Object object, long windowId); void save(Map<Long, Map<Slice, Bucket.BucketedValue>> unsavedData, long windowId,
      boolean skipWriteToWindowFile); Map<Long, Object> retrieveAllWindows(); @Override void committed(long committedWindowId); @Override void teardown(); void setLatestExpiredTimeBucket(long timeBucket); long getLastTransferredWindow();  }
@Test public void testSave() throws IOException { testMeta.checkpointManager.setup(testMeta.managedStateContext); Map<Long, Map<Slice, Bucket.BucketedValue>> buckets5 = ManagedStateTestUtils.getTestData(0, 5, 0); testMeta.checkpointManager.save(buckets5, 10, false); testMeta.checkpointManager.teardown(); KryoCloneUtils<IncrementalCheckpointManager> cloneUtils = KryoCloneUtils.createCloneUtils(testMeta.checkpointManager); testMeta.checkpointManager = cloneUtils.getClone(); testMeta.checkpointManager.setup(testMeta.managedStateContext); @SuppressWarnings("unchecked") Map<Long, Map<Slice, Bucket.BucketedValue>> buckets5After = (Map<Long, Map<Slice, Bucket.BucketedValue>>) testMeta.checkpointManager.retrieve(10); Assert.assertEquals("saved", buckets5, buckets5After); testMeta.checkpointManager.teardown(); }