### Question:
Primitive extends JsonWrapper { public static int fromUInt16(short value) { return (int) (value & 0xFFFF); } 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 testFromUInt16() { assertEquals(0, Primitive.fromUInt16((short) 0)); assertEquals(5, Primitive.fromUInt16((short) 5)); assertEquals(10, Primitive.fromUInt16((short) 10)); assertEquals(15, Primitive.fromUInt16((short) 15)); assertEquals(65535, Primitive.fromUInt16((short) -1)); }
@Test public void testFromUInt16Array() { int[] values = Primitive.fromUInt16(new short[] { 0, 5, 10, 15, -1 }); assertEquals(0, values[0]); assertEquals(5, values[1]); assertEquals(10, values[2]); assertEquals(15, values[3]); assertEquals(65535, values[4]); }