@Override
    public void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out) {
        while (isValidHeader(in.readableBytes())) {
            if (startupPhase) {
                handleStartupPhase(in, out);
                return;
            }
            int payloadLength = in.getInt(in.readerIndex() + 1);
            if (in.readableBytes() < MESSAGE_TYPE_LENGTH + payloadLength) {
                return;
            }
            byte type = in.getByte(in.readerIndex());
            CommandPacketType commandPacketType = OpenGaussCommandPacketType.valueOf(type);
            if (requireAggregation(commandPacketType)) {
                pendingMessages.add(in.readRetainedSlice(MESSAGE_TYPE_LENGTH + payloadLength));
            } else if (pendingMessages.isEmpty()) {
                out.add(in.readRetainedSlice(MESSAGE_TYPE_LENGTH + payloadLength));
            } else {
                handlePendingMessages(context, in, out, payloadLength);
            }
        }
    }
@Test
    void assertDecodeWithStickyPacket() {
        List<Object> out = new LinkedList<>();
        new OpenGaussPacketCodecEngine().decode(context, byteBuf, out);
        assertTrue(out.isEmpty());
    }