Update to IMS instrument status test for robustness and fix to agent status builder.
Merge pull request #1557 from edwardhunter/ims_status_tests_rebase2

OOION 1396. Improve ims status tests and fix status builder bug.