def METHOD_NAME(self):
    attr = AttrFactory.create(
        types=[
            AttrTypeFactory.create(qname="foo"),
            AttrTypeFactory.native(DataType.INT),
            AttrTypeFactory.native(DataType.SHORT),
            AttrTypeFactory.create(qname="bar"),
        ]
    )
    self.assertCountEqual([attr.types[0], attr.types[-1]], list(attr.user_types))