Adding paging tests and handling errors

Change-Id: I6621d976c911c92875f89c243ad74b4d3f17cf96