### Question:
PacketNumber { public static long validate(final long number) { Preconditions.checkArgument(number >= 0); Preconditions.checkArgument(number <= Varint.MAX); return number; } 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 validateBounds() { PacketNumber.validate(0); PacketNumber.validate(123); PacketNumber.validate(4611686018427387903L); }
@Test(expected = IllegalArgumentException.class) public void validateBoundsTooSmall() { PacketNumber.validate(-1); }
@Test(expected = IllegalArgumentException.class) public void validateBoundsTooLarge() { PacketNumber.validate(4611686018427387904L); }