Avoid testing text directly for equality. Parse JSON object and test
individual fields. Attempted jruby fix.