Background extends AbstractScesimModel<BackgroundData> { public List<BackgroundDataWithIndex> getBackgroundDataWithIndex() { return toScesimDataWithIndex(BackgroundDataWithIndex::new); }  List<BackgroundDataWithIndex> getBackgroundDataWithIndex(); @Override BackgroundData addData(int index); @Override Background cloneModel();  }
@Test public void getBackgroundDataWithIndex() { List<BackgroundDataWithIndex> backgroundDataWithIndex = background.getBackgroundDataWithIndex(); assertEquals(background.getUnmodifiableData().size(), backgroundDataWithIndex.size()); BackgroundDataWithIndex backgroundData = backgroundDataWithIndex.get(0); int index = backgroundData.getIndex(); assertEquals(background.getDataByIndex(index - 1), backgroundData.getScesimData()); }