### Question:
Primitive extends JsonWrapper { public static long toUInt64(BigInteger value) { return value.longValue(); } 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 testToUInt64() { assertEquals(0l, Primitive.toUInt64(BigInteger.valueOf(0l))); assertEquals(5l, Primitive.toUInt64(BigInteger.valueOf(5l))); assertEquals(10l, Primitive.toUInt64(BigInteger.valueOf(10l))); assertEquals(15l, Primitive.toUInt64(BigInteger.valueOf(15l))); assertEquals(-1l, Primitive.toUInt64(new BigInteger("18446744073709551615"))); }
@Test public void testToUInt64Array() { long[] values = Primitive.toUInt64(new BigInteger[] { BigInteger.valueOf(0l), BigInteger.valueOf(5l), BigInteger.valueOf(10l), BigInteger.valueOf(15l), new BigInteger("18446744073709551615") }); assertEquals(0l, values[0]); assertEquals(5l, values[1]); assertEquals(10l, values[2]); assertEquals(15l, values[3]); assertEquals(-1l, values[4]); }