def METHOD_NAME():
    schema = Schema.from_descriptor(
        {
            "fields": [
                {"name": "name", "type": "string"},
                {"name": "id", "type": "integer"},
            ]
        }
    )
    detector = Detector(schema_sync=True)
    resource = TableResource(
        path="data/sync-schema.csv", schema=schema, detector=detector
    )
    resource.infer(stats=True)
    assert resource.schema == schema
    assert resource.sample == [["name", "id"], ["english", "1"], ["中国人", "2"]]
    assert resource.fragment == [["english", "1"], ["中国人", "2"]]
    assert resource.header == ["name", "id"]
    assert resource.read_rows() == [
        {"id": 1, "name": "english"},
        {"id": 2, "name": "中国人"},
    ]