Added a client class to use in tests. Fixed one of the tests

heartbeat not hartbeat