public int getSegmentId() {
        return segmentId;
    }
@Test
    void testGetSegmentId() {
        int segmentId = 1;
        NettyPayload nettyPayload = NettyPayload.newSegment(segmentId);
        assertThat(nettyPayload.getSegmentId()).isEqualTo(segmentId);
        assertThatThrownBy(() -> NettyPayload.newSegment(-1))
                .isInstanceOf(IllegalStateException.class);
    }