@Override
    public void handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates) {
        final Set<ExecutionState> notFinishedExecutionStates =
                checkNotNull(terminatedExecutionStates).stream()
                        .filter(state -> state != ExecutionState.FINISHED)
                        .collect(Collectors.toSet());

        if (notFinishedExecutionStates.isEmpty()) {
            handleExecutionsFinished();
        } else {
            handleAnyExecutionNotFinished(notFinishedExecutionStates);
        }
    }
@Test
    void testInvalidExecutionTerminationCall() {
        assertThatThrownBy(
                        () ->
                                createTestInstanceFailingOnGlobalFailOver()
                                        .handleExecutionsTermination(
                                                Collections.singletonList(ExecutionState.FINISHED)))
                .isInstanceOf(UnsupportedOperationException.class);
    }