def METHOD_NAME(
    default_model_storage: ModelStorage, default_execution_context: ExecutionContext
):
    resource = Resource("xy")
    mapper = EntitySynonymMapper.create(
        {}, default_model_storage, resource, default_execution_context
    )
    examples = [
        Message(
            data={
                TEXT: "What's the weather in austria?",
                "intent": "whats_weather",
                "entities": [
                    {"start": 22, "end": 29, "value": "austria", "entity": "GPE"}
                ],
            }
        ),
        Message(
            data={
                TEXT: "weather vienna?",
                "intent": "whats_weather",
                "entities": [
                    {"start": 8, "end": 14, "value": "austria", "entity": "GPE"}
                ],
            }
        ),
    ]
    entities = [
        {"entity": "test", "value": "austria", "start": 0, "end": 7},
        {"entity": "test", "value": "Austria", "start": 0, "end": 7},
        {"entity": "test", "value": "AUSTRIA", "start": 0, "end": 7},
        {"entity": "test", "value": "ausTRIA", "start": 0, "end": 7},
        {"entity": "test", "value": "Vienna", "start": 0, "end": 7},
        {"entity": "test", "value": "brazil", "start": 0, "end": 7},
    ]
    mapper.train(TrainingData(training_examples=examples))
    mapper.replace_synonyms(entities)
    expected_synonym_value = "austria"
    # synonym key for example value is present
    assert mapper.synonyms.get("vienna") == expected_synonym_value
    # synonym key for self is present
    assert mapper.synonyms.get("austria") == expected_synonym_value
    # all replacement values are correct
    assert entities[0]["value"] == expected_synonym_value
    assert entities[1]["value"] == expected_synonym_value
    assert entities[2]["value"] == expected_synonym_value
    assert entities[3]["value"] == expected_synonym_value
    assert entities[4]["value"] == expected_synonym_value
    assert entities[5]["value"] != expected_synonym_value