public void testShouldSwitchProductPageBackAndForth() {
Mock catalogServiceMock = mock(CatalogService.class);
CatalogBean bean = new CatalogBean((CatalogService) catalogServiceMock.proxy());
PaginatedList productList = new PaginatedArrayList(2);
productList.add(new Product());
productList.add(new Product());
productList.add(new Product());
productList.add(new Product());
productList.add(new Product());
bean.setProductList(productList);
bean.setPageDirection("next");
bean.switchProductListPage();
assertEquals(1, productList.getPageIndex());