@Override
    public Object deserialize(Asn1ObjectInputStream in, Class<? extends Object> type, Asn1ObjectMapper mapper) {
        final Asn1Entity entity = type.getAnnotation(Asn1Entity.class);
        final Fields fields = new FieldSet(entity.partial(), mapper.getFields(type));
        return readFields(mapper, in, fields, ObjectUtils.newInstance(type));
    }
@Test
    public void shouldDeserializeWithOptional() {
        assertEquals(new Set(1, 2, 3), deserialize(
            new SetConverter(), Set.class, new byte[] {
                (byte) 0x81, 1, 0x01, (byte) 0x82, 1, 0x02, (byte) 0x83, 1, 0x03
            }
        ));
    }