@Test
public void testIntEncode() {

    Int zero = new Int64(BigInteger.ZERO);
    assertThat(TypeEncoder.encodeNumeric(zero),
            is("0000000000000000000000000000000000000000000000000000000000000000"));
    Int maxLong = new Int64(BigInteger.valueOf(Long.MAX_VALUE));
    assertThat(TypeEncoder.encodeNumeric(maxLong),
            is("0000000000000000000000000000000000000000000000007fffffffffffffff"));
    Int minLong = new Int64(BigInteger.valueOf(Long.MIN_VALUE));
    assertThat(TypeEncoder.encodeNumeric(minLong),
            is("ffffffffffffffffffffffffffffffffffffffffffffffff8000000000000000"));
    Int minusOne = new Int(BigInteger.valueOf(-1));
    assertThat(TypeEncoder.encodeNumeric(minusOne),
            is("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
}