Added support for automocking functions with functions.