public void broadcastEvent(AbstractEvent event) throws IOException {
        broadcastEvent(event, false);
    }
@TestTemplate
    void testBroadcastEventNoRecords() throws Exception {
        int numberOfSubpartitions = 4;
        int bufferSize = 32;

        ResultPartition partition = createResultPartition(bufferSize, numberOfSubpartitions);
        RecordWriter<ByteArrayIO> writer = createRecordWriter(partition);
        CheckpointBarrier barrier =
                new CheckpointBarrier(
                        Integer.MAX_VALUE + 919192L,
                        Integer.MAX_VALUE + 18828228L,
                        CheckpointOptions.forCheckpointWithDefaultLocation());

        // No records emitted yet, broadcast should not request a buffer
        writer.broadcastEvent(barrier);

        assertThat(partition.getBufferPool().bestEffortGetNumOfUsedBuffers()).isZero();

        for (int i = 0; i < numberOfSubpartitions; i++) {
            assertThat(partition.getNumberOfQueuedBuffers(i)).isOne();
            ResultSubpartitionView view =
                    partition.createSubpartitionView(
                            new ResultSubpartitionIndexSet(i), new NoOpBufferAvailablityListener());
            BufferOrEvent boe = parseBuffer(view.getNextBuffer().buffer(), i);
            assertThat(boe.isEvent()).isTrue();
            assertThat(boe.getEvent()).isEqualTo(barrier);
            assertThat(view.getAvailabilityAndBacklog(true).isAvailable()).isFalse();
        }
    }