Fixed resource duplication and set up test jar generation
Rearranged test init & util code.  Added util function to test a model's toJSON().