### Question:
PendingCheckpoint { public boolean canBeSubsumed() { return !props.forceCheckpoint(); } PendingCheckpoint(
			JobID jobId,
			long checkpointId,
			long checkpointTimestamp,
			Map<ExecutionAttemptID, ExecutionVertex> verticesToConfirm,
			CheckpointProperties props,
			CheckpointStorageLocation targetLocation,
			Executor executor); JobID getJobId(); long getCheckpointId(); long getCheckpointTimestamp(); int getNumberOfNonAcknowledgedTasks(); int getNumberOfAcknowledgedTasks(); Map<OperatorID, OperatorState> getOperatorStates(); boolean isFullyAcknowledged(); boolean isAcknowledgedBy(ExecutionAttemptID executionAttemptId); boolean isDiscarded(); boolean canBeSubsumed(); boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle); CompletableFuture<CompletedCheckpoint> getCompletionFuture(); CompletedCheckpoint finalizeCheckpoint(); TaskAcknowledgeResult acknowledgeTask(
			ExecutionAttemptID executionAttemptId,
			TaskStateSnapshot operatorSubtaskStates,
			CheckpointMetrics metrics); void addMasterState(MasterState state); void abort(CheckpointFailureReason reason, @Nullable Throwable cause); void abort(CheckpointFailureReason reason); @Override String toString();  }### Answer:
@Test public void testCanBeSubsumed() throws Exception { CheckpointProperties forced = new CheckpointProperties(true, CheckpointType.SAVEPOINT, false, false, false, false, false); PendingCheckpoint pending = createPendingCheckpoint(forced); assertFalse(pending.canBeSubsumed()); try { pending.abort(CheckpointFailureReason.CHECKPOINT_SUBSUMED); fail("Did not throw expected Exception"); } catch (IllegalStateException ignored) { } CheckpointProperties subsumed = new CheckpointProperties(false, CheckpointType.SAVEPOINT, false, false, false, false, false); pending = createPendingCheckpoint(subsumed); assertTrue(pending.canBeSubsumed()); }