### Question:
Execute extends PGMessage { public static Execute loadFromPacket(byte[] packet) { PGProto proto = new PGProto(packet, 5); String portal = proto.readNullStr(); int returns = proto.readInt32(); return new Execute(portal, returns); } Execute();  Execute(String portal, int returns); String getPortal(); void setPortal(String portal); int getReturns(); void setReturns(int returns); static Execute loadFromPacket(byte[] packet); @Override String toString();  }### Answer:
@Test public void testLoadFromPacket() { String portal = "py:0x1023d39b0"; int returns = 0; Execute exec = new Execute(portal, returns); byte[] bytes = exec.toPacket(); Execute newExec = Execute.loadFromPacket(bytes); assertEquals(newExec.toPacket(), bytes); assertEquals(newExec.getPortal(), portal); assertEquals(newExec.getReturns(), returns); }