WorkerKey byApiKey(String apiKey) { final index = apiKeys.indexOf(apiKey); if (index >= 0) { return keys[index]; } return stubWorkerKey; }