Fix expandTemplate usage in test