void connectionEstablished(NettyConnectionWriter nettyConnectionWriter) {
        this.nettyConnectionWriter = nettyConnectionWriter;
    }
@Test
    void testConnectionEstablished() {
        MemoryTierSubpartitionProducerAgent subpartitionProducerAgent =
                createSubpartitionProducerAgent();

        assertThatThrownBy(
                        () ->
                                subpartitionProducerAgent.addFinishedBuffer(
                                        BufferBuilderTestUtils.buildSomeBuffer()))
                .isInstanceOf(NullPointerException.class);
        subpartitionProducerAgent.connectionEstablished(
                new TestingNettyConnectionWriter.Builder().build());
        assertThatCode(
                        () ->
                                subpartitionProducerAgent.addFinishedBuffer(
                                        BufferBuilderTestUtils.buildSomeBuffer()))
                .doesNotThrowAnyException();
    }