adding unit tests for https://wso2.org/jira/browse/ESBJAVA-3018
Merge pull request #27 from dushansachinda/master

adding unit tests for https://wso2.org/jira/browse/ESBJAVA-3018