unittest for the client