add unitest and mock client test