Adding test cases for amplitude module
Bug fixes in tests