Changed Environment to Factory in pagination tests