test Metric (de)serialization