Use the parsed id values for the later assertions

* the 'id' variable was previously unused, but is helpful to validate that the correct document
  is returned
* the category id doesn't have to be hard-coded in the test (and the JSON document), but rather we
  can read it from the DBObject/DBRef and query using it
Merge pull request #432 from Collaborne/tests/dbref-test-stronger

Use the parsed id values for the later assertions