Include testing mode into a function.