Refactored expressions tests. Refs #18586

we