### Question:
DataConvertingUtility { public static byte[] convertVariableUInt(long value) { int len = 1; if (value > 0) { len = (int) Math.ceil((Math.log10(value + 1) / Math.log10(2)) / 8); } byte[] data = new byte[len]; for (int i = 0; i < len; i++) { data[i] = (byte) (0xFF & (value >> 8 * (len - (i + 1)))); } return data; } private  DataConvertingUtility(); static Long readVariableULong(byte[] data); static Map<String, String> parseUriQuery(String uriQuery); static Map<String, List<String>> parseUriQueryMult(String uriQuery); static byte[] convertVariableUInt(long value); static String decodeToString(byte[] byteString); static byte[] encodeString(String payload); static byte[] intToByteArray(int value); static byte[] combine(byte[] arr1, byte[] arr2);  }### Answer:
@Test public void testConvertVariableUInt() { assertArrayEquals(fromHex("00"), convertVariableUInt(0x00)); assertArrayEquals(fromHex("02"), convertVariableUInt(0x02)); assertArrayEquals(fromHex("ff"), convertVariableUInt(0xFF)); assertArrayEquals(fromHex("0100"), convertVariableUInt(0x0100)); assertArrayEquals(fromHex("0203"), convertVariableUInt(0x0203)); assertArrayEquals(fromHex("ffff"), convertVariableUInt(0xFFFF)); assertArrayEquals(fromHex("010000"), convertVariableUInt(0x010000)); assertArrayEquals(fromHex("020304"), convertVariableUInt(0x020304)); assertArrayEquals(fromHex("02030405"), convertVariableUInt(0x02030405)); }