### Question:
PacketNumber { public static byte[] write(final long number, final int length) { final byte[] b = new byte[length]; for (int j = length; j > 0; j--) { b[length - j] = (byte) ((number >> (8 * (j - 1))) & 0xFF); } return b; } private  PacketNumber(); static long parse(final byte[] b); static long validate(final long number); static long next(final long number); static int getLength(final long number); static byte[] write(final long number, final int length); static final long MIN; }### Answer:
@Test public void write() { final byte[] b = PacketNumber.write(123, 4); TestUtil.assertHex("0000007b", b); }