PostgreSQLReadyForQueryPacket implements PostgreSQLPacket { @Override public void write(final PostgreSQLPacketPayload payload) { payload.writeInt1(STATUS); }  @Override void write(final PostgreSQLPacketPayload payload);  }
@Test public void assertReadWrite() { ByteBuf byteBuf = ByteBufTestUtils.createByteBuf(1); PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf); PostgreSQLReadyForQueryPacket packet = new PostgreSQLReadyForQueryPacket(); assertThat(packet.getMessageType(), is(PostgreSQLCommandPacketType.READY_FOR_QUERY.getValue())); packet.write(payload); assertThat(byteBuf.writerIndex(), is(1)); assertThat(byteBuf.readByte(), is((byte) 'I')); }