added tests for next and previous pages