More robust matchers for generated template.
Move custom helpers and assertions to the separate file.