@Override
    public void serialize(Asn1OutputStream out, BigInteger obj) {
        final byte[] data = obj.toByteArray();
        if (data[0] == 0) {
            out.write(data, 1, data.length - 1);
        } else {
            out.write(data);
        }
    }
@Test
    public void shouldSerialize() {
        assertArrayEquals(
            new byte[] { -128 },
            serialize(new BigIntegerConverter(), BigInteger.class, BigInteger.valueOf(128))
        );
    }