Mock APIs for the client and the server.