@Test public void testConvertWithDefaults() { TelemetryRequest telemetryRequest = new TelemetryRequest(); EnvironmentTelemetry result = underTest.convert(telemetryRequest, new Features()); assertNull(result.getFeatures()); }
public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) { EnvironmentTelemetry telemetry = null; if (request != null) { telemetry = new EnvironmentTelemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics())); telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures)); telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes())); } return telemetry; }
TelemetryApiConverter { public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) { EnvironmentTelemetry telemetry = null; if (request != null) { telemetry = new EnvironmentTelemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics())); telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures)); telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes())); } return telemetry; } }
TelemetryApiConverter { public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) { EnvironmentTelemetry telemetry = null; if (request != null) { telemetry = new EnvironmentTelemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics())); telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures)); telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes())); } return telemetry; } TelemetryApiConverter(TelemetryConfiguration configuration); }
TelemetryApiConverter { public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) { EnvironmentTelemetry telemetry = null; if (request != null) { telemetry = new EnvironmentTelemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics())); telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures)); telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes())); } return telemetry; } TelemetryApiConverter(TelemetryConfiguration configuration); EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures); TelemetryResponse convert(EnvironmentTelemetry telemetry); TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry); }
TelemetryApiConverter { public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) { EnvironmentTelemetry telemetry = null; if (request != null) { telemetry = new EnvironmentTelemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics())); telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures)); telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes())); } return telemetry; } TelemetryApiConverter(TelemetryConfiguration configuration); EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures); TelemetryResponse convert(EnvironmentTelemetry telemetry); TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry);  }