Replace integration tests with unit tests for the remote API