Added stubbing capability to client for use in tests