Fix JENKINS-20133

Made sure the field names and the parsing code matched. Added tests.