Added some basic tests for the application of substitutions.