Fix a issue which causes error when default policy is selected.
Add test codes to avoid the same mistakes again.
Fix a bug of the test code which is:
* KafkaBrokerPublisher tries to connect localhost when __init__
is called because of the lack of mocking _get_client function
before initializing KafkaBrokerPublisher.
Closes-Bug: 1441175
Closes-Bug: 1441258
Change-Id: I306db443a866860ee45b2362b8a0cd2a59d8c3a2