Provide a way to stub out generic global functions

Some functions are generic enough that it doesn't make sense to abstract them into a class