Add class to function as a proxy during tests