public CheckpointProperties(
            boolean forced,
            SnapshotType checkpointType,
            boolean discardSubsumed,
            boolean discardFinished,
            boolean discardCancelled,
            boolean discardFailed,
            boolean discardSuspended,
            boolean unclaimed) {

        this.forced = forced;
        this.checkpointType = checkNotNull(checkpointType);
        this.discardSubsumed = discardSubsumed;
        this.discardFinished = discardFinished;
        this.discardCancelled = discardCancelled;
        this.discardFailed = discardFailed;
        this.discardSuspended = discardSuspended;
        this.unclaimed = unclaimed;
    }
@Test
    void testCheckpointProperties() {
        CheckpointProperties props =
                CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_FAILURE);

        assertThat(props.forceCheckpoint()).isFalse();
        assertThat(props.discardOnSubsumed()).isTrue();
        assertThat(props.discardOnJobFinished()).isTrue();
        assertThat(props.discardOnJobCancelled()).isTrue();
        assertThat(props.discardOnJobFailed()).isFalse();
        assertThat(props.discardOnJobSuspended()).isTrue();

        props =
                CheckpointProperties.forCheckpoint(
                        CheckpointRetentionPolicy.RETAIN_ON_CANCELLATION);

        assertThat(props.forceCheckpoint()).isFalse();
        assertThat(props.discardOnSubsumed()).isTrue();
        assertThat(props.discardOnJobFinished()).isTrue();
        assertThat(props.discardOnJobCancelled()).isFalse();
        assertThat(props.discardOnJobFailed()).isFalse();
        assertThat(props.discardOnJobSuspended()).isFalse();
    }