### Question:
Varint { public static int writeUnsignedVarLong(long value, DataOutput out) throws IOException { byte[] buff = new byte[10]; int cnt = 0; while ((value & 0xFFFFFFFFFFFFFF80L) != 0L) { buff[cnt++] = (byte) (((int) value & 0x7F) | 0x80); value >>>= 7; } buff[cnt++] = (byte) ((int) value & 0x7F); out.write(buff, 0, cnt); return cnt; } private  Varint(); static int writeSignedVarLong(long value, DataOutput out); static int writeUnsignedVarLong(long value, DataOutput out); static int writeSignedVarInt(int value, DataOutput out); static int writeUnsignedVarInt(int value, DataOutput out); static int writeUnsignedVarInt(int value, byte[] buff); static long readSignedVarLong(DataInput in); static long readUnsignedVarLong(DataInput in); static int readSignedVarInt(DataInput in); static int readUnsignedVarInt(DataInput in); static int readUnsignedVarInt(byte[] from);  }### Answer:
@Test public void writeUnsignedVarLongTest() throws IOException { checkUnsignedVarLong(Long.MAX_VALUE); checkUnsignedVarLong(0); checkUnsignedVarLong(1001); }