Add test for StateT's apply function

This test makes sure the effect of the lhs argument only got applied once.