mock function fully compiles and executes