def METHOD_NAME(instance, override_hostname, expected_hostname, expected_tag):
    instance['override_hostname'] = override_hostname
    config = IBMMQConfig(instance, {})
    assert config.hostname == expected_hostname
    if expected_tag:
        assert expected_tag in config.tags