Fix api client parent class and tests