Fix tests to clear the campaign configuration before they start, as
the config is a static singleton object.
Added test cases and implementations for templates