Add a test for template replay