Improved tests for json service