Use mock definitions in tests where appropriate