refactoring the api tests
Merge pull request #2 from samaitra/master

refactoring the api tests