setCache(static::$cache) ->build(); return (new ClientBuilder()) ->setApiUrl(TestConfig::getApiUrl()) ->setAuthenticatorHandler($authenticator ?? new HeaderAuthenticatorHandler(TestConfig::getApiKey())) ->setDebugLogger($logger) ->setEventDispatcher($eventDispatcher) ->setFormEncoder($encoder) ->setHttpClient($client) ->build(); } }