@Override
    public void serialize(Asn1OutputStream out, Class<? extends ASN1Primitive> type, ASN1Primitive value,
                          Asn1ObjectMapper mapper) throws IOException {
        Asn1Utils.writeRawValue(value.getEncoded(), out);
    }
@Test
    public void shouldSerialize() {
        assertArrayEquals(
            new byte[] { 0x2a, 0x03, 0x04 },
            serialize(new BouncyCastlePrimitiveConverter(), ASN1ObjectIdentifier.class, new ASN1ObjectIdentifier("1.2.3.4"))
        );
    }