Add integration tests and fix received message writing to a file in test suit and sending correct number of messages in a multi-threaded environment.
Merge pull request #52 from akalankapagoda/Integration_tests

Add integration tests and fix received message writing to a file in test suit