add tests for the main client