@Override
    protected void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out) {
        int readableBytes = in.readableBytes();
        if (!databasePacketCodecEngine.isValidHeader(readableBytes)) {
            return;
        }
        if (log.isDebugEnabled()) {
            log.debug("Read from client {} :\n{}", context.channel().id().asShortText(), ByteBufUtil.prettyHexDump(in));
        }
        databasePacketCodecEngine.decode(context, in, out);
    }
@Test
    void assertDecodeWithValidHeader() {
        when(byteBuf.readableBytes()).thenReturn(1);
        when(databasePacketCodecEngine.isValidHeader(1)).thenReturn(true);
        packetCodec.decode(context, byteBuf, Collections.emptyList());
        verify(databasePacketCodecEngine).decode(context, byteBuf, Collections.emptyList());
    }