def test_my_collection(self):
     assert (DataClassWithMyCollection.from_json('{"xs": [1]}') ==
             DataClassWithMyCollection(MyCollection([1])))
 def test_my_list_collection(self):
     assert (DataClassWithMyCollection.from_json_array('[{"xs": [1]}]') == [
         DataClassWithMyCollection(MyCollection([1]))
     ])
 def test_my_collection(self):
     assert DataClassWithMyCollection(MyCollection(
         [1])).to_json() == '{"xs": [1]}'