### Question:
UInt64 implements Comparable<UInt64> { public static UInt64 fromLongBits(final long value) { return value == 0 ? ZERO : new UInt64(value); } private  UInt64(final long value); static UInt64 valueOf(final long value); static UInt64 valueOf(final String value); static UInt64 valueOf(final BigInteger value); static UInt64 fromLongBits(final long value); UInt64 plus(final long other); UInt64 increment(); UInt64 decrement(); UInt64 plus(final UInt64 other); UInt64 minus(final long other); UInt64 minus(final UInt64 other); UInt64 times(final long other); UInt64 times(final UInt64 other); UInt64 dividedBy(final long divisor); UInt64 dividedBy(final UInt64 divisor); UInt64 mod(final long divisor); UInt64 mod(final UInt64 divisor); UInt64 max(final UInt64 other); UInt64 max(final long other); UInt64 min(final UInt64 other); UInt64 min(final long other); @Override int compareTo(final UInt64 o); boolean isGreaterThan(final UInt64 other); boolean isGreaterThanOrEqualTo(final UInt64 other); boolean isLessThan(final UInt64 other); boolean isLessThanOrEqualTo(final UInt64 other); long longValue(); int intValue(); BigInteger bigIntegerValue(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final int BYTES; static final UInt64 ZERO; static final UInt64 ONE; static final UInt64 MAX_VALUE; }### Answer:
@Test void compareTo_shouldCompareUnsigned() { final Long[] inputs = {1451L, Long.MAX_VALUE, -124234L, Long.MIN_VALUE, 0L, -1L, -5L, 1L}; final List<UInt64> sortedUInt64s = Stream.of(inputs).map(UInt64::fromLongBits).sorted().collect(Collectors.toList()); assertThat(sortedUInt64s) .containsExactly( UInt64.fromLongBits(0), UInt64.fromLongBits(1), UInt64.fromLongBits(1451), UInt64.fromLongBits(Long.MAX_VALUE), UInt64.fromLongBits(Long.MIN_VALUE), UInt64.fromLongBits(-124234L), UInt64.fromLongBits(-5), UInt64.fromLongBits(-1)); }
@Test void compareTo_shouldBeEqualWhenEqual() { assertThat(UInt64.fromLongBits(-675)).isEqualByComparingTo(UInt64.fromLongBits(-675)); }