Test if inner functions are called properly