improve assertions in SerializerTest