Add tests for modelUtils

This PR adds a bunch of tests for the modelUtils.

I'm not quite sure about the `requireAMD` part I changed in the modelUtils. `require` is assigned to `requireAMD` anyways so why an extra variable (or in my case now a method to make it stubable)?