Add unit test for using S(Q,w)

Refs #10410