RestClient - improve test code