Change test added in 3e34005b1b to be more stable.

It could fail when actual serialization JSON field ordering was
different from the hard-coded one. Refs #13182.