fix deserialization and add a unit test for AnnotatedCompositeSerializer with generics