### Question:
PageBuilder { public void rebuildSwitchersAfterRemoval(int removedPageIndex) { if (removedPageIndex == 0) { this.rebuildPageSwitchers(removedPageIndex); } if (removedPageIndex == pages.size()) { this.rebuildPageSwitchers(removedPageIndex - 1); } }  void rebuildSwitchersAfterRemoval(int removedPageIndex); void rebuildPageSwitchers(int pageIndex); void addSwitchItems(int i, Inventory page); void rebuildPageByIndex(int index); String pageTitle(int index, int total);  }### Answer:
@Test public void rebuildSwitchersAfterRemoval() { PagesList pagesList = mock(PagesList.class); PageBuilder pageBuilder = new PageBuilder( "Title", mock(Server.class), pagesList ); afterRemovingFirstElement(pagesList, pageBuilder); afterRemovingMidElement(pagesList, pageBuilder); afterRemovingLastElement(pagesList, pageBuilder); }