### Question:
Parse extends PGMessage { public static Parse loadFromPacket(byte[] packet) { PGProto proto = new PGProto(packet, 5); Parse parse = new Parse(); parse.setStatement(proto.readNullStr()); parse.setQuery(proto.readNullStr()); int paramOidCount = proto.readInt16(); int[] paramOids = new int[paramOidCount]; for (int i = 0; i < paramOidCount; i++) { paramOids[i] = proto.readInt32(); } parse.setParamOids(paramOids); return parse; }  String getStatement(); void setStatement(String statement); String getQuery(); void setQuery(String query); int[] getParamOids(); void setParamOids(int[] paramOids); int getParamOidCount(); static Parse loadFromPacket(byte[] packet); @Override String toString();  }### Answer:
@Test public void testLoadFromPacket() { String statement = "py:0x1023d39b0"; String query = "insert into sharding_none (id, name) values ($1, $2)"; int[] paramOids = new int[] {10}; Parse parse = new Parse(); parse.setStatement(statement); parse.setQuery(query); parse.setParamOids(paramOids); byte[] bytes = parse.toPacket(); Parse newParse = Parse.loadFromPacket(bytes); assertEquals(newParse.toPacket(), bytes); assertEquals(newParse.getStatement(), statement); assertEquals(newParse.getQuery(), query); assertEquals(newParse.getParamOidCount(), paramOids.length); assertEquals(newParse.getParamOids(), paramOids); }