Add tests for optional_fields, falling back to item_type and closed sets of fields.