remove unused code
Adding unit tests
Merge from upstream
Phase out usage of Agent::GetInstance()
merge commit
Merge pull request #311 from manishsing/master

add UT cases