usually I will prefer testing against the JSON value directly, but that means parsing the result, which in this case seems a bit to complex regarding the purpose of the test.