Added unit tests for Api integration