Added test to check that the JSON produced matches what we expected