tests: CachedClient test refactored