Refactored expressions tests. Refs #18586

e.g.