PostgreSQLPacketCodecEngine implements DatabasePacketCodecEngine<PostgreSQLPacket> { @Override public PostgreSQLPacketPayload createPacketPayload(final ByteBuf message) { return new PostgreSQLPacketPayload(message); }  @Override boolean isValidHeader(final int readableBytes); @Override void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out, final int readableBytes); @Override void encode(final ChannelHandlerContext context, final PostgreSQLPacket message, final ByteBuf out); @Override PostgreSQLPacketPayload createPacketPayload(final ByteBuf message);  }
@Test public void assertCreatePacketPayload() { assertThat(new PostgreSQLPacketCodecEngine().createPacketPayload(byteBuf).getByteBuf(), is(byteBuf)); }