Issue #16 now covers this. It will be fixed once the session branch has been merged, as that updates the module exports from rest.js which will make it easier to add this function to the exports to enable unit tests.