Simulation extends AbstractScesimModel<Scenario> { public List<ScenarioWithIndex> getScenarioWithIndex() { return toScesimDataWithIndex(ScenarioWithIndex::new); }  List<ScenarioWithIndex> getScenarioWithIndex(); @Override Scenario addData(int index); @Override Simulation cloneModel();  }
@Test public void getScenarioWithIndex() { List<ScenarioWithIndex> scenarioWithIndex = simulation.getScenarioWithIndex(); assertEquals(simulation.getUnmodifiableData().size(), scenarioWithIndex.size()); ScenarioWithIndex scenario = scenarioWithIndex.get(0); int index = scenario.getIndex(); assertEquals(simulation.getDataByIndex(index - 1), scenario.getScesimData()); }