Tests for paginate. Other changes regarding tests pair programmed with Mathias Eurich