@Test
public void testIntEncode() {

    Int zero = new Int64(BigInteger.ZERO);
    assertThat(PlatOnTypeEncoder.encode(zero),
            is("0000000000000000"));
    Int maxLong = new Int64(BigInteger.valueOf(Long.MAX_VALUE));
    assertThat(PlatOnTypeEncoder.encode(maxLong),
            is("7fffffffffffffff"));
    
    Int minLong = new Int64(BigInteger.valueOf(Long.MIN_VALUE));
    assertThat(PlatOnTypeEncoder.encode(minLong),
            is("8000000000000000"));
    Int minusOne = new Int64(BigInteger.valueOf(-1));
    assertThat(PlatOnTypeEncoder.encode(minusOne),
            is("ffffffffffffffff"));
}