Mecanim OnAnimatorMove function not being called?

I have attached a script which has this line in it.

void OnAnimatorMove ()
{
	Debug.Log ("hello");
}

This script is attached to a gameobject that has animator component. However this function is never being called. What do I need to do to get this line printed?

The animator must make use of root motion