# This code has been automatically generated by:
# dev_scripts/test_codegen/generate_test_for_over_X_or_empty.py
# Do NOT edit or append.


"""Test ``over_X_or_empty`` methods."""


# pylint: disable=missing-docstring


import unittest

import tests.common
import tests.common_jsonization


class Test_Extension(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Extension`.
    """

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_extension()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Extension"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Extension"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_extension()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Extension"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Extension"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_refers_to_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_extension()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Extension"
            / "on_maximal.json"
            / "over_refers_to_or_empty.trace"
        )

        assert instance.refers_to is not None, (
            "Unexpected refers_to is None " "in the maximal example of " "Extension"
        )

        log = [tests.common.trace(list(instance.over_refers_to_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_refers_to_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_extension()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Extension"
            / "on_minimal.json"
            / "over_refers_to_or_empty.trace"
        )

        assert instance.refers_to is None, (
            "Unexpected refers_to not None " "in the minimal example of " "Extension"
        )

        log = [tests.common.trace(list(instance.over_refers_to_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_AdministrativeInformation(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.AdministrativeInformation`.
    """

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_administrative_information()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AdministrativeInformation"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "AdministrativeInformation"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_administrative_information()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AdministrativeInformation"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "AdministrativeInformation"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Qualifier(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Qualifier`.
    """

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_qualifier()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Qualifier"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Qualifier"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_qualifier()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Qualifier"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Qualifier"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_AssetAdministrationShell(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.AssetAdministrationShell`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "AssetAdministrationShell"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "AssetAdministrationShell"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodels_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_maximal.json"
            / "over_submodels_or_empty.trace"
        )

        assert instance.submodels is not None, (
            "Unexpected submodels is None "
            "in the maximal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_submodels_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodels_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_asset_administration_shell()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetAdministrationShell"
            / "on_minimal.json"
            / "over_submodels_or_empty.trace"
        )

        assert instance.submodels is None, (
            "Unexpected submodels not None "
            "in the minimal example of "
            "AssetAdministrationShell"
        )

        log = [tests.common.trace(list(instance.over_submodels_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_AssetInformation(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.AssetInformation`.
    """

    # The maximal example of AssetInformation contains no specific_asset_ids,
    # so we can not generate the corresponding test case
    # test_over_specific_asset_ids_or_empty_on_maximal_instance_against_recorded.

    def test_over_specific_asset_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_asset_information()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AssetInformation"
            / "on_minimal.json"
            / "over_specific_asset_ids_or_empty.trace"
        )

        assert instance.specific_asset_ids is None, (
            "Unexpected specific_asset_ids not None "
            "in the minimal example of "
            "AssetInformation"
        )

        log = [tests.common.trace(list(instance.over_specific_asset_ids_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_SpecificAssetID(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.SpecificAssetID`.
    """

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_specific_asset_id()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SpecificAssetId"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "SpecificAssetID"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_specific_asset_id()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SpecificAssetId"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "SpecificAssetID"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Submodel(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Submodel`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Submodel"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Submodel"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Submodel"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Submodel"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Submodel"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodel_elements_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_maximal.json"
            / "over_submodel_elements_or_empty.trace"
        )

        assert instance.submodel_elements is not None, (
            "Unexpected submodel_elements is None "
            "in the maximal example of "
            "Submodel"
        )

        log = [tests.common.trace(list(instance.over_submodel_elements_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodel_elements_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Submodel"
            / "on_minimal.json"
            / "over_submodel_elements_or_empty.trace"
        )

        assert instance.submodel_elements is None, (
            "Unexpected submodel_elements not None "
            "in the minimal example of "
            "Submodel"
        )

        log = [tests.common.trace(list(instance.over_submodel_elements_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_RelationshipElement(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.RelationshipElement`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "RelationshipElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_relationship_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "RelationshipElement"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "RelationshipElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_SubmodelElementList(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.SubmodelElementList`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_maximal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is not None, (
            "Unexpected value is None "
            "in the maximal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_list()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementList"
            / "on_minimal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is None, (
            "Unexpected value not None "
            "in the minimal example of "
            "SubmodelElementList"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_SubmodelElementCollection(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.SubmodelElementCollection`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_maximal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is not None, (
            "Unexpected value is None "
            "in the maximal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_submodel_element_collection()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "SubmodelElementCollection"
            / "on_minimal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is None, (
            "Unexpected value not None "
            "in the minimal example of "
            "SubmodelElementCollection"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Property(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Property`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Property"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Property"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Property"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Property"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Property"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Property"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_MultiLanguageProperty(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.MultiLanguageProperty`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_maximal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is not None, (
            "Unexpected value is None "
            "in the maximal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_value_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_multi_language_property()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "MultiLanguageProperty"
            / "on_minimal.json"
            / "over_value_or_empty.trace"
        )

        assert instance.value is None, (
            "Unexpected value not None "
            "in the minimal example of "
            "MultiLanguageProperty"
        )

        log = [tests.common.trace(list(instance.over_value_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Range(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Range`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Range"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Range"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Range"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Range"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_range()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Range"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Range"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_ReferenceElement(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.ReferenceElement`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "ReferenceElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_reference_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ReferenceElement"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "ReferenceElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Blob(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Blob`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Blob"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Blob"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Blob"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Blob"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_blob()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Blob"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Blob"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_File(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.File`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "File"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "File"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "File"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "File"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_file()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "File"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "File"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_AnnotatedRelationshipElement(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.AnnotatedRelationshipElement`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_annotations_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_maximal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_maximal.json"
            / "over_annotations_or_empty.trace"
        )

        assert instance.annotations is not None, (
            "Unexpected annotations is None "
            "in the maximal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_annotations_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_annotations_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = (
            tests.common_jsonization.load_minimal_annotated_relationship_element()
        )
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "AnnotatedRelationshipElement"
            / "on_minimal.json"
            / "over_annotations_or_empty.trace"
        )

        assert instance.annotations is None, (
            "Unexpected annotations not None "
            "in the minimal example of "
            "AnnotatedRelationshipElement"
        )

        log = [tests.common.trace(list(instance.over_annotations_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Entity(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Entity`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Entity"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Entity"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Entity"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Entity"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_statements_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_maximal.json"
            / "over_statements_or_empty.trace"
        )

        assert instance.statements is not None, (
            "Unexpected statements is None " "in the maximal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_statements_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_statements_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_statements_or_empty.trace"
        )

        assert instance.statements is None, (
            "Unexpected statements not None " "in the minimal example of " "Entity"
        )

        log = [tests.common.trace(list(instance.over_statements_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    # The maximal example of Entity contains no specific_asset_ids,
    # so we can not generate the corresponding test case
    # test_over_specific_asset_ids_or_empty_on_maximal_instance_against_recorded.

    def test_over_specific_asset_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_entity()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Entity"
            / "on_minimal.json"
            / "over_specific_asset_ids_or_empty.trace"
        )

        assert instance.specific_asset_ids is None, (
            "Unexpected specific_asset_ids not None "
            "in the minimal example of "
            "Entity"
        )

        log = [tests.common.trace(list(instance.over_specific_asset_ids_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_BasicEventElement(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.BasicEventElement`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "BasicEventElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_basic_event_element()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "BasicEventElement"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "BasicEventElement"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Operation(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Operation`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None " "in the minimal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Operation"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Operation"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Operation"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Operation"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Operation"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_input_variables_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_input_variables_or_empty.trace"
        )

        assert instance.input_variables is not None, (
            "Unexpected input_variables is None "
            "in the maximal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_input_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_input_variables_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_input_variables_or_empty.trace"
        )

        assert instance.input_variables is None, (
            "Unexpected input_variables not None "
            "in the minimal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_input_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_output_variables_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_output_variables_or_empty.trace"
        )

        assert instance.output_variables is not None, (
            "Unexpected output_variables is None "
            "in the maximal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_output_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_output_variables_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_output_variables_or_empty.trace"
        )

        assert instance.output_variables is None, (
            "Unexpected output_variables not None "
            "in the minimal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_output_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_inoutput_variables_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_maximal.json"
            / "over_inoutput_variables_or_empty.trace"
        )

        assert instance.inoutput_variables is not None, (
            "Unexpected inoutput_variables is None "
            "in the maximal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_inoutput_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_inoutput_variables_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_operation()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Operation"
            / "on_minimal.json"
            / "over_inoutput_variables_or_empty.trace"
        )

        assert instance.inoutput_variables is None, (
            "Unexpected inoutput_variables not None "
            "in the minimal example of "
            "Operation"
        )

        log = [tests.common.trace(list(instance.over_inoutput_variables_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Capability(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Capability`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None " "in the maximal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None " "in the minimal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None " "in the maximal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "Capability"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None " "in the maximal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None " "in the minimal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is not None, (
            "Unexpected supplemental_semantic_ids is None "
            "in the maximal example of "
            "Capability"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_supplemental_semantic_ids_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_supplemental_semantic_ids_or_empty.trace"
        )

        assert instance.supplemental_semantic_ids is None, (
            "Unexpected supplemental_semantic_ids not None "
            "in the minimal example of "
            "Capability"
        )

        log = [
            tests.common.trace(list(instance.over_supplemental_semantic_ids_or_empty()))
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is not None, (
            "Unexpected qualifiers is None " "in the maximal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_qualifiers_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_qualifiers_or_empty.trace"
        )

        assert instance.qualifiers is None, (
            "Unexpected qualifiers not None " "in the minimal example of " "Capability"
        )

        log = [tests.common.trace(list(instance.over_qualifiers_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "Capability"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_capability()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Capability"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "Capability"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_ConceptDescription(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.ConceptDescription`.
    """

    def test_over_extensions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_maximal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is not None, (
            "Unexpected extensions is None "
            "in the maximal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_extensions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_minimal.json"
            / "over_extensions_or_empty.trace"
        )

        assert instance.extensions is None, (
            "Unexpected extensions not None "
            "in the minimal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_extensions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_maximal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is not None, (
            "Unexpected display_name is None "
            "in the maximal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_display_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_minimal.json"
            / "over_display_name_or_empty.trace"
        )

        assert instance.display_name is None, (
            "Unexpected display_name not None "
            "in the minimal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_display_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_maximal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is not None, (
            "Unexpected description is None "
            "in the maximal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_description_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_minimal.json"
            / "over_description_or_empty.trace"
        )

        assert instance.description is None, (
            "Unexpected description not None "
            "in the minimal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_description_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_maximal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is not None, (
            "Unexpected embedded_data_specifications is None "
            "in the maximal example of "
            "ConceptDescription"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_embedded_data_specifications_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_minimal.json"
            / "over_embedded_data_specifications_or_empty.trace"
        )

        assert instance.embedded_data_specifications is None, (
            "Unexpected embedded_data_specifications not None "
            "in the minimal example of "
            "ConceptDescription"
        )

        log = [
            tests.common.trace(
                list(instance.over_embedded_data_specifications_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_is_case_of_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_maximal.json"
            / "over_is_case_of_or_empty.trace"
        )

        assert instance.is_case_of is not None, (
            "Unexpected is_case_of is None "
            "in the maximal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_is_case_of_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_is_case_of_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_concept_description()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "ConceptDescription"
            / "on_minimal.json"
            / "over_is_case_of_or_empty.trace"
        )

        assert instance.is_case_of is None, (
            "Unexpected is_case_of not None "
            "in the minimal example of "
            "ConceptDescription"
        )

        log = [tests.common.trace(list(instance.over_is_case_of_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_Environment(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.Environment`.
    """

    def test_over_asset_administration_shells_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_maximal.json"
            / "over_asset_administration_shells_or_empty.trace"
        )

        assert instance.asset_administration_shells is not None, (
            "Unexpected asset_administration_shells is None "
            "in the maximal example of "
            "Environment"
        )

        log = [
            tests.common.trace(
                list(instance.over_asset_administration_shells_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_asset_administration_shells_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_minimal.json"
            / "over_asset_administration_shells_or_empty.trace"
        )

        assert instance.asset_administration_shells is None, (
            "Unexpected asset_administration_shells not None "
            "in the minimal example of "
            "Environment"
        )

        log = [
            tests.common.trace(
                list(instance.over_asset_administration_shells_or_empty())
            )
        ]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodels_or_empty_on_maximal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_maximal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_maximal.json"
            / "over_submodels_or_empty.trace"
        )

        assert instance.submodels is not None, (
            "Unexpected submodels is None " "in the maximal example of " "Environment"
        )

        log = [tests.common.trace(list(instance.over_submodels_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_submodels_or_empty_on_minimal_instance_against_recorded(self) -> None:
        instance = tests.common_jsonization.load_minimal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_minimal.json"
            / "over_submodels_or_empty.trace"
        )

        assert instance.submodels is None, (
            "Unexpected submodels not None " "in the minimal example of " "Environment"
        )

        log = [tests.common.trace(list(instance.over_submodels_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_concept_descriptions_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_maximal.json"
            / "over_concept_descriptions_or_empty.trace"
        )

        assert instance.concept_descriptions is not None, (
            "Unexpected concept_descriptions is None "
            "in the maximal example of "
            "Environment"
        )

        log = [tests.common.trace(list(instance.over_concept_descriptions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_concept_descriptions_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_environment()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "Environment"
            / "on_minimal.json"
            / "over_concept_descriptions_or_empty.trace"
        )

        assert instance.concept_descriptions is None, (
            "Unexpected concept_descriptions not None "
            "in the minimal example of "
            "Environment"
        )

        log = [tests.common.trace(list(instance.over_concept_descriptions_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


class Test_DataSpecificationIEC61360(unittest.TestCase):
    """
    Test ``over_X_or_default`` on instances of
    :py:class:`aas_core3.types.DataSpecificationIEC61360`.
    """

    def test_over_short_name_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_data_specification_iec_61360()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "DataSpecificationIec61360"
            / "on_maximal.json"
            / "over_short_name_or_empty.trace"
        )

        assert instance.short_name is not None, (
            "Unexpected short_name is None "
            "in the maximal example of "
            "DataSpecificationIEC61360"
        )

        log = [tests.common.trace(list(instance.over_short_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_short_name_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_data_specification_iec_61360()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "DataSpecificationIec61360"
            / "on_minimal.json"
            / "over_short_name_or_empty.trace"
        )

        assert instance.short_name is None, (
            "Unexpected short_name not None "
            "in the minimal example of "
            "DataSpecificationIEC61360"
        )

        log = [tests.common.trace(list(instance.over_short_name_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_definition_or_empty_on_maximal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_maximal_data_specification_iec_61360()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "DataSpecificationIec61360"
            / "on_maximal.json"
            / "over_definition_or_empty.trace"
        )

        assert instance.definition is not None, (
            "Unexpected definition is None "
            "in the maximal example of "
            "DataSpecificationIEC61360"
        )

        log = [tests.common.trace(list(instance.over_definition_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)

    def test_over_definition_or_empty_on_minimal_instance_against_recorded(
        self,
    ) -> None:
        instance = tests.common_jsonization.load_minimal_data_specification_iec_61360()
        expected_path = (
            tests.common.TEST_DATA_DIR
            / "test_over_X_or_empty"
            / "DataSpecificationIec61360"
            / "on_minimal.json"
            / "over_definition_or_empty.trace"
        )

        assert instance.definition is None, (
            "Unexpected definition not None "
            "in the minimal example of "
            "DataSpecificationIEC61360"
        )

        log = [tests.common.trace(list(instance.over_definition_or_empty()))]
        got_text = tests.common.trace_log_as_text_file_content(log)
        tests.common.record_or_check(expected_path, got_text)


if __name__ == "__main__":
    unittest.main()


# This code has been automatically generated by:
# dev_scripts/test_codegen/generate_test_for_over_X_or_empty.py
# Do NOT edit or append.
