Add tests for the client

Change-Id: Icbca6ffbd792515e6e0d4b499aeaa4be0ed5bc6a