### Question:
ClouderaManagerMgmtTelemetryService { @VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); }  void setupTelemetryRole(final Stack stack, final ApiClient client, final ApiHostRef cmHostRef,
            final ApiRoleList mgmtRoles, final Telemetry telemetry); void updateTelemetryConfigs(final Stack stack, final ApiClient client,
            final Telemetry telemetry, final String sdxContextName,
            final String sdxStackCrn, final ProxyConfig proxyConfig);  }### Answer:
@Test public void testBuildTelemetryCMConfigList() { WorkloadAnalytics workloadAnalytics = new WorkloadAnalytics(); ApiConfigList result = underTest.buildTelemetryCMConfigList(workloadAnalytics); assertEquals(4, result.getItems().size()); assertTrue(containsConfigWithValue(result, "telemetry_wa", "true")); assertTrue(containsConfigWithValue(result, "telemetry_master", "true")); assertTrue(containsConfigWithValue(result, "telemetry_altus_account", "cb-altus-access")); }
@Test public void testBuildTelemetryCMConfigListWithCustomEndpoint() { WorkloadAnalytics workloadAnalytics = new WorkloadAnalytics(); workloadAnalytics.setDatabusEndpoint("customEndpoint"); ApiConfigList result = underTest.buildTelemetryCMConfigList(workloadAnalytics); assertEquals(5, result.getItems().size()); assertTrue(containsConfigWithValue(result, "telemetry_altus_url", "customEndpoint")); }