@Test
public void testEncode() throws Exception {

    IntegerStringCodec codec = new IntegerStringCodec();
    Assert.assertArrayEquals(new byte[] { 0x30, 0x30, 0x30 }, codec.encode(null, 24));
    Assert.assertArrayEquals(new byte[] { 0x31, 0x32, 0x33 }, codec.encode(123, 24));
    Assert.assertArrayEquals(new byte[] { 0x30, 0x32, 0x33 }, codec.encode(23, 24));
    Assert.assertArrayEquals(new byte[] { 0x30, 0x30, 0x33 }, codec.encode(3, 24));
    codec.reset();
}