public Map<String, Object> getTelemetryResponse(User currentUser) {
        TelemetryUserSettings telemetryUserSettings = getTelemetryUserSettings(currentUser);
        if (isTelemetryEnabled && telemetryUserSettings.telemetryEnabled()) {
            DateTime clusterCreationDate = telemetryClusterService.getClusterCreationDate().orElse(null);
            String clusterId = telemetryClusterService.getClusterId();

            List<TelemetryLicenseStatus> licenseStatuses = enterpriseDataProvider.licenseStatus();
            return telemetryResponseFactory.createTelemetryResponse(
                    getClusterInfo(clusterId, clusterCreationDate, licenseStatuses),
                    getUserInfo(currentUser, clusterId),
                    getPluginInfo(),
                    getSearchClusterInfo(),
                    licenseStatuses,
                    telemetryUserSettings,
                    getDataNodeInfo());
        } else {
            return telemetryResponseFactory.createTelemetryDisabledResponse(telemetryUserSettings);
        }
    }
@Test
    void test_telemetry_enabled_for_user() {
        TelemetryService telemetryService = createTelemetryService(true);
        mockUserTelemetryEnabled(true);
        mockTrafficData(trafficCounterService);

        Map<String, Object> response = telemetryService.getTelemetryResponse(user);

        assertThatAllTelemetryDataIsPresent(response);
    }