@Test
public void migrateIfNecessary() throws Exception {

    Assertions.assertThatThrownBy(() -> instance.migrateIfNecessary("<ScenarioSimulationModel version=\"9999999999.99999999999\" />"))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessage("Version 9999999999.99999999999 of the file is not supported. Current version is " + ScenarioSimulationXMLPersistence.getCurrentVersion());
    String noMigrationNeeded = "<ScenarioSimulationModel version=\"" + currentVersion + "\" />";
    String afterMigration = instance.migrateIfNecessary(noMigrationNeeded);
    Document document = DOMParserUtil.getDocument(afterMigration);
    commonCheckVersion(document, ScenarioSimulationXMLPersistence.getCurrentVersion());
}