@Override
    public void serialize(Asn1OutputStream out, Class<? extends Object> type, Object instance, Asn1ObjectMapper mapper)
            throws IOException {
        writeFields(mapper, out, type, instance);
    }
@Test
    public void shouldSerializeWithOptional() {
        assertArrayEquals(
            new byte[] { (byte) 0x81, 1, 0x01, (byte) 0x82, 1, 0x02, (byte) 0x83, 1, 0x03 },
            serialize(new SetConverter(), Set.class, new Set(1, 2, 3))
        );
    }