### Question:
SeparatedCellList extends AbstractList<Cell> { @Override public Cell remove(int index) { if (index == 0) { Cell result = myBaseList.remove(0); if (size() != 0) { myBaseList.remove(0); } return result; } else { myBaseList.remove(index * 2 - 1); Cell result = myBaseList.remove(index * 2 - 1); if (size() > index) { myBaseList.set(index * 2 - 1, createSeparator(get(index - 1), get(index))); } return result; } } 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 removeFromStart() { init("x", "y"); separatedList.remove(0); assertList("y"); }
@Test public void removeFromEnd() { init("x", "y"); separatedList.remove(1); assertList("x"); }
@Test public void removeFromMiddle() { init("x", "y", "z"); separatedList.remove(1); assertList("x, x+z, z"); }