The previous code has a lot of code unrelated to mock_template. So, this commit replaces it with a better example which also demonstrates how to test conditionals in templates.