### Question:
BytesValues { public static BytesValue ofUnsignedShort(int v) { checkArgument(v >= 0 && v <= MAX_UNSIGNED_SHORT, "Value %s cannot be represented as an unsigned short (it is negative or too big)", v); byte[] res = new byte[2]; res[0] = b(v >> 8); res[1] = b(v); return BytesValue.wrap(res); } private  BytesValues(); static int countZeros(BytesValue value); static BytesValue trimLeadingZeros(BytesValue value); static BytesValue toMinimalBytes(long l); static BytesValue ofUnsignedByte(int v); static BytesValue ofUnsignedShort(int v); static BytesValue ofUnsignedInt(long v); static BytesValue ofUnsignedIntLittleEndian(long v); static int extractInt(BytesValue value); static int extractIntLittleEndian(BytesValue value); static long extractLong(BytesValue value); static BytesValue concatenate(BytesValue... values); static BigInteger asUnsignedBigInteger(BytesValue bytes); static String asString(BytesValue bytes); static BigInteger asSignedBigInteger(BytesValue bytes); static BytesValue and(BytesValue b1, BytesValue b2); static BytesValue or(BytesValue b1, BytesValue b2);  }### Answer:
@Test public void unsignedShort() { assertEquals(h("0x0000"), ofUnsignedShort(0)); assertEquals(h("0x0001"), ofUnsignedShort(1)); assertEquals(h("0x0100"), ofUnsignedShort(256)); assertEquals(h("0xFFFF"), ofUnsignedShort(65535)); }
@Test public void unsignedShortNegative() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Value -1 cannot be represented as an unsigned short"); ofUnsignedShort(-1); }
@Test public void unsignedShortTooBig() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Value 65536 cannot be represented as an unsigned short"); ofUnsignedShort(65536); }