Added test for variable replacement code