Add tests for handling remote calls