Changed test to use a module level function instead of a class