Com_Sleep extends Packet { public static Com_Sleep loadFromPacket(byte[] packet) { Com_Sleep obj = new Com_Sleep(); Proto proto = new Proto(packet, 3); obj.sequenceId = proto.get_fixed_int(1); proto.get_filler(1); return obj; }  ArrayList<byte[]> getPayload(); static Com_Sleep loadFromPacket(byte[] packet);  }
@Test public void test1() { byte[] packet = Proto.packet_string_to_bytes("" + "01 00 00 00 00" ); Com_Sleep pkt = Com_Sleep.loadFromPacket(packet); assertArrayEquals(packet, pkt.toPacket()); }