Added integration tests to test APi