@Override
    public void handleSavepointCreation(
            CompletedCheckpoint completedSavepoint, Throwable throwable) {
        if (throwable != null) {
            checkArgument(
                    completedSavepoint == null,
                    "No savepoint should be provided if a throwable is passed.");
            handleSavepointCreationFailure(throwable);
        } else {
            handleSavepointCreationSuccess(checkNotNull(completedSavepoint));
        }
    }
@Test
    void testSavepointCreationParameterBothSet() {
        assertThatThrownBy(
                        () ->
                                createTestInstanceFailingOnGlobalFailOver()
                                        .handleSavepointCreation(
                                                createCompletedSavepoint(
                                                        new EmptyStreamStateHandle()),
                                                new Exception(
                                                        "No exception should be passed if a savepoint is available.")))
                .isInstanceOf(IllegalArgumentException.class);
    }