### Question:
Primitive extends JsonWrapper { public static short toUInt16(int value) { int tmp = (int) ((value >> 16) << 16); return (short) (value - tmp); } Primitive(String jsonString, String primitiveType);  Primitive(JsonObject jsonObject, String primitiveType); String getPrimitiveType(); void setPrimitiveType(String primitiveType); static byte toUInt8(short value); static byte[] toUInt8(short[] values); static short fromUInt8(byte value); static short[] fromUInt8(byte[] values); static short toUInt16(int value); static short[] toUInt16(int[] values); static int fromUInt16(short value); static int[] fromUInt16(short[] values); static int toUInt32(long value); static int[] toUInt32(long[] values); static long fromUInt32(int value); static long[] fromUInt32(int[] values); static long toUInt64(BigInteger value); static long[] toUInt64(BigInteger[] values); static BigInteger fromUInt64(long value); static BigInteger[] fromUInt64(long[] values); static final String EMPTY_MESSAGE; }### Answer:
@Test public void testToUInt16() { assertEquals((short) 0, Primitive.toUInt16(0)); assertEquals((short) 5, Primitive.toUInt16(5)); assertEquals((short) 10, Primitive.toUInt16(10)); assertEquals((short) 15, Primitive.toUInt16(15)); assertEquals((short) -1, Primitive.toUInt16(Integer.MAX_VALUE)); }
@Test public void testToUInt16Array() { short[] values = Primitive.toUInt16(new int[] { 0, 5, 10, 15, Integer.MAX_VALUE }); assertEquals((short) 0, values[0]); assertEquals((short) 5, values[1]); assertEquals((short) 10, values[2]); assertEquals((short) 15, values[3]); assertEquals((short) -1, values[4]); }