client hostname should be set as server for headpin and sam, as for them
client does not have headpin installed
added more scenarios for github issue 132
added more checks
Merge remote-tracking branch 'upstream/master'
Merge pull request #157 from hhovsepy/master

added more test cases