@Override
    public CheckpointStateToolset createTaskOwnedCheckpointStateToolset() {
        if (fileSystem instanceof PathsCopyingFileSystem) {
            return new FsCheckpointStateToolset(
                    taskOwnedStateDirectory, (PathsCopyingFileSystem) fileSystem);
        } else {
            return new NotDuplicatingCheckpointStateToolset();
        }
    }
@Test
    void testDuplicationCheckpointStateToolset() throws Exception {
        CheckpointStorageAccess checkpointStorage =
                new FsCheckpointStorageAccess(
                        new TestDuplicatingFileSystem(),
                        randomTempPath(),
                        null,
                        true,
                        new JobID(),
                        FILE_SIZE_THRESHOLD,
                        WRITE_BUFFER_SIZE);

        assertThat(checkpointStorage.createTaskOwnedCheckpointStateToolset())
                .isInstanceOf(FsCheckpointStateToolset.class);
    }