@Test
public void importData() throws IOException {

    Simulation originalSimulation = createDummySimulation(3, 1);
    assertEquals(1, originalSimulation.getUnmodifiableData().size());
    String rawCSV = "OTHER,OTHER,GIVEN,GIVEN,GIVEN\r\n" +
            "#,Scenario description,instance1,instance2,instance3\r\n" +
            "Index,Description,property1,property2,property3\r\n" +
            "1,My Scenario,value1,value2,";
    AbstractScesimModel retrieved = scenarioCsvImportExport.importData(rawCSV, originalSimulation);
    assertEquals(1, retrieved.getUnmodifiableData().size());
    assertEquals("value1", retrieved.getDataByIndex(0).getFactMappingValue(retrieved.getScesimModelDescriptor().getFactMappingByIndex(2)).get().getRawValue());
    assertEquals("value2", retrieved.getDataByIndex(0).getFactMappingValue(retrieved.getScesimModelDescriptor().getFactMappingByIndex(3)).get().getRawValue());
    assertNull(retrieved.getDataByIndex(0).getFactMappingValue(retrieved.getScesimModelDescriptor().getFactMappingByIndex(4)).get().getRawValue());
    assertThatThrownBy(() -> scenarioCsvImportExport.importData("", originalSimulation))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessage("Malformed file, missing header");
}