Generalized testing framework to work with any type that has a type serializer