[tests]: Beefing up middleware construction tests.