@Test public void testConvertToRequest() { EnvironmentLogging logging = new EnvironmentLogging(); S3CloudStorageParameters s3Params = new S3CloudStorageParameters(); s3Params.setInstanceProfile(INSTANCE_PROFILE_VALUE); logging.setS3(s3Params); EnvironmentTelemetry telemetry = new EnvironmentTelemetry(); telemetry.setLogging(logging); TelemetryRequest result = underTest.convertToRequest(telemetry); assertNull(result.getFeatures()); assertEquals(INSTANCE_PROFILE_VALUE, result.getLogging().getS3().getInstanceProfile()); }
public TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry) { TelemetryRequest telemetryRequest = null; if (telemetry != null) { telemetryRequest = new TelemetryRequest(); telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes()); telemetryRequest.setLogging(createLoggingRequestFromEnvSource(telemetry.getLogging())); telemetryRequest.setFeatures(createFeaturesRequestEnvSource(telemetry.getFeatures())); } return telemetryRequest; }
TelemetryApiConverter { public TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry) { TelemetryRequest telemetryRequest = null; if (telemetry != null) { telemetryRequest = new TelemetryRequest(); telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes()); telemetryRequest.setLogging(createLoggingRequestFromEnvSource(telemetry.getLogging())); telemetryRequest.setFeatures(createFeaturesRequestEnvSource(telemetry.getFeatures())); } return telemetryRequest; } }
TelemetryApiConverter { public TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry) { TelemetryRequest telemetryRequest = null; if (telemetry != null) { telemetryRequest = new TelemetryRequest(); telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes()); telemetryRequest.setLogging(createLoggingRequestFromEnvSource(telemetry.getLogging())); telemetryRequest.setFeatures(createFeaturesRequestEnvSource(telemetry.getFeatures())); } return telemetryRequest; } TelemetryApiConverter(TelemetryConfiguration configuration); }
TelemetryApiConverter { public TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry) { TelemetryRequest telemetryRequest = null; if (telemetry != null) { telemetryRequest = new TelemetryRequest(); telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes()); telemetryRequest.setLogging(createLoggingRequestFromEnvSource(telemetry.getLogging())); telemetryRequest.setFeatures(createFeaturesRequestEnvSource(telemetry.getFeatures())); } return telemetryRequest; } TelemetryApiConverter(TelemetryConfiguration configuration); EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures); TelemetryResponse convert(EnvironmentTelemetry telemetry); TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry); }
TelemetryApiConverter { public TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry) { TelemetryRequest telemetryRequest = null; if (telemetry != null) { telemetryRequest = new TelemetryRequest(); telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes()); telemetryRequest.setLogging(createLoggingRequestFromEnvSource(telemetry.getLogging())); telemetryRequest.setFeatures(createFeaturesRequestEnvSource(telemetry.getFeatures())); } return telemetryRequest; } TelemetryApiConverter(TelemetryConfiguration configuration); EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures); TelemetryResponse convert(EnvironmentTelemetry telemetry); TelemetryRequest convertToRequest(EnvironmentTelemetry telemetry);  }