Add test for histogram serialization/deserialization