Regression test: only hostName is provided inside hostAttr
Check for missing attributes inside <hostAttr>
Replace inject with each_with_object