public final InputChannel toInputChannel() throws IOException {
        Preconditions.checkState(
                stateConsumedFuture.isDone(), "recovered state is not fully consumed");
        final InputChannel inputChannel = toInputChannelInternal();
        inputChannel.checkpointStopped(lastStoppedCheckpointId);
        return inputChannel;
    }
@Test
    void testConversionOnlyPossibleAfterConsumed() {
        assertThatThrownBy(() -> buildChannel().toInputChannel())
                .isInstanceOf(IllegalStateException.class);
    }