boolean tryCloseGateway(long checkpointId) {
        checkRunsInMainThread();

        if (currentMarkedCheckpointIds.contains(checkpointId)) {
            blockedEventsMap.putIfAbsent(checkpointId, new LinkedList<>());
            return true;
        }

        return false;
    }
@Test
    void notClosingUnmarkedGateway() {
        final EventReceivingTasks receiver = EventReceivingTasks.createForRunningTasks();
        final SubtaskGatewayImpl gateway =
                new SubtaskGatewayImpl(
                        getUniqueElement(receiver.getAccessesForSubtask(11)),
                        ComponentMainThreadExecutorServiceAdapter.forMainThread(),
                        new IncompleteFuturesTracker());

        final boolean isClosed = gateway.tryCloseGateway(123L);

        assertThat(isClosed).isFalse();
    }