Testing json with generics as serialization library