@Test
public void testQuantityEncodeLeadingZero() {

    assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(0L)), equalTo("0x00"));
    assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(1024L)), equalTo("0x400"));
    assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(Long.MAX_VALUE)),
            equalTo("0x7fffffffffffffff"));
    assertThat(Numeric.toHexStringWithPrefixSafe(
            new BigInteger("204516877000845695339750056077105398031")),
            equalTo("0x99dc848b94efc27edfad28def049810f"));
}