### Question:
SeparatedCellList extends AbstractList<Cell> { @Override public void add(int index, Cell element) { if (index == 0) { if (!myBaseList.isEmpty()) { myBaseList.add(0, createSeparator(element, get(0))); } myBaseList.add(0, element); } else { myBaseList.add(index * 2 - 1, createSeparator(get(index - 1), element)); myBaseList.add(index * 2, element); if (index + 1 < size()) { myBaseList.set(index * 2 + 1, createSeparator(element, get(index + 1))); } } } protected  SeparatedCellList(List<Cell> baseList); @Override Cell get(int index); @Override int size(); @Override void add(int index, Cell element); @Override Cell remove(int index); @Override Cell set(int index, Cell element);  }### Answer:
@Test public void insertInStart() { init("x", "y"); separatedList.add(0, new TextCell("a")); assertList("a, a+x, x, x+y, y"); }
@Test public void insertInMiddle() { init("x", "y"); separatedList.add(1, new TextCell("a")); assertList("x, x+a, a, a+y, y"); }