Refactored order_with_respect_to tests Refs #18586

chop newline for consistency