added client tests. Went through a small mocking hell.