// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoublePointData aDoublePoint =
//     DoublePointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         32d);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoubleSummaryPointData aDoubleSummaryPoint =
//     DoubleSummaryPointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         1,
//         32d,
//         Collections.emptyList());
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final Resource aGceResource = Resource.create(someGceAttributes);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoubleHistogramPointData aHistogramPoint =
//     DoubleHistogramPointData.create(
//         0,
//         1,
//         Attributes.builder().put("test", "one").build(),
//         3d,
//         Arrays.asList(1.0),
//         Arrays.asList(1L, 2L),
//         Arrays.asList(
//             DoubleExemplarData.create(
//                 Attributes.builder().put("test2", "two").build(), 2, "spanId", "traceId", 3.0)));
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final LongPointData aLongPoint =
//     LongPointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         32L);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final MetricData aMetricData =
//     MetricData.createLongSum(
//         aGceResource,
//         anInstrumentationLibraryInfo,
//         "opentelemetry/name",
//         "description",
//         "ns",
//         LongSumData.create(
//             true, AggregationTemporality.CUMULATIVE, ImmutableList.of(aLongPoint)));
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final InstrumentationLibraryInfo anInstrumentationLibraryInfo =
//     InstrumentationLibraryInfo.create("instrumentName", "0");
// 
// Path: exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java
// static final String DESCRIPTOR_TYPE_URL = "custom.googleapis.com/OpenTelemetry/";
// 
// Path: exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java
// static final String METRIC_DESCRIPTOR_TIME_UNIT = "ns";


import static com.google.cloud.opentelemetry.metric.FakeData.aDoublePoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aDoubleSummaryPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aGceResource;
import static com.google.cloud.opentelemetry.metric.FakeData.aHistogramPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aLongPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aMetricData;
import static com.google.cloud.opentelemetry.metric.FakeData.anInstrumentationLibraryInfo;
import static com.google.cloud.opentelemetry.metric.MetricTranslator.DESCRIPTOR_TYPE_URL;
import static com.google.cloud.opentelemetry.metric.MetricTranslator.METRIC_DESCRIPTOR_TIME_UNIT;
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import com.google.api.Distribution;
import com.google.api.LabelDescriptor;
import com.google.api.LabelDescriptor.ValueType;
import com.google.api.Metric;
import com.google.api.Metric.Builder;
import com.google.api.MetricDescriptor;
import com.google.api.MetricDescriptor.MetricKind;
import com.google.common.collect.ImmutableList;
import com.google.monitoring.v3.DroppedLabels;
import com.google.monitoring.v3.SpanContext;
import com.google.protobuf.InvalidProtocolBufferException;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
import io.opentelemetry.sdk.metrics.data.DoubleHistogramData;
import io.opentelemetry.sdk.metrics.data.DoubleSumData;
import io.opentelemetry.sdk.metrics.data.DoubleSummaryData;
import io.opentelemetry.sdk.metrics.data.LongSumData;
import io.opentelemetry.sdk.metrics.data.MetricData;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
    String name = "Metric Name";
    String description = "Metric Description";
    String unit = "ns";
    MetricData metricData =
        MetricData.createDoubleSummary(
            aGceResource,
            anInstrumentationLibraryInfo,
            name,
            description,
            unit,
            DoubleSummaryData.create(ImmutableList.of(aDoubleSummaryPoint)));

    MetricDescriptor actualDescriptor =
        MetricTranslator.mapMetricDescriptor(metricData, aLongPoint);
    assertNull(actualDescriptor);
  }

  @Test
  public void testMapMetricDescriptorWithDeltaSumReturnsNull() {
    String name = "Metric Name";
    String description = "Metric Description";
    String unit = "ns";
    MetricData metricData =
        MetricData.createDoubleSum(
            aGceResource,
            anInstrumentationLibraryInfo,
            name,
            description,
            unit,
            DoubleSumData.create(
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoublePointData aDoublePoint =
//     DoublePointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         32d);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoubleSummaryPointData aDoubleSummaryPoint =
//     DoubleSummaryPointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         1,
//         32d,
//         Collections.emptyList());
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final Resource aGceResource = Resource.create(someGceAttributes);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final DoubleHistogramPointData aHistogramPoint =
//     DoubleHistogramPointData.create(
//         0,
//         1,
//         Attributes.builder().put("test", "one").build(),
//         3d,
//         Arrays.asList(1.0),
//         Arrays.asList(1L, 2L),
//         Arrays.asList(
//             DoubleExemplarData.create(
//                 Attributes.builder().put("test2", "two").build(), 2, "spanId", "traceId", 3.0)));
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final LongPointData aLongPoint =
//     LongPointData.create(
//         1599030114 * NANO_PER_SECOND,
//         1599031814 * NANO_PER_SECOND,
//         Attributes.of(stringKey("label1"), "value1", booleanKey("label2"), false),
//         32L);
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final MetricData aMetricData =
//     MetricData.createLongSum(
//         aGceResource,
//         anInstrumentationLibraryInfo,
//         "opentelemetry/name",
//         "description",
//         "ns",
//         LongSumData.create(
//             true, AggregationTemporality.CUMULATIVE, ImmutableList.of(aLongPoint)));
// 
// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
// static final InstrumentationLibraryInfo anInstrumentationLibraryInfo =
//     InstrumentationLibraryInfo.create("instrumentName", "0");
// 
// Path: exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java
// static final String DESCRIPTOR_TYPE_URL = "custom.googleapis.com/OpenTelemetry/";
// 
// Path: exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java
// static final String METRIC_DESCRIPTOR_TIME_UNIT = "ns";


// Path: exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/MetricTranslatorTest.java
import static com.google.cloud.opentelemetry.metric.FakeData.aDoublePoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aDoubleSummaryPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aGceResource;
import static com.google.cloud.opentelemetry.metric.FakeData.aHistogramPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aLongPoint;
import static com.google.cloud.opentelemetry.metric.FakeData.aMetricData;
import static com.google.cloud.opentelemetry.metric.FakeData.anInstrumentationLibraryInfo;
import static com.google.cloud.opentelemetry.metric.MetricTranslator.DESCRIPTOR_TYPE_URL;
import static com.google.cloud.opentelemetry.metric.MetricTranslator.METRIC_DESCRIPTOR_TIME_UNIT;
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import com.google.api.Distribution;
import com.google.api.LabelDescriptor;
import com.google.api.LabelDescriptor.ValueType;
import com.google.api.Metric;
import com.google.api.Metric.Builder;
import com.google.api.MetricDescriptor;
import com.google.api.MetricDescriptor.MetricKind;
import com.google.common.collect.ImmutableList;
import com.google.monitoring.v3.DroppedLabels;
import com.google.monitoring.v3.SpanContext;
import com.google.protobuf.InvalidProtocolBufferException;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
import io.opentelemetry.sdk.metrics.data.DoubleHistogramData;
import io.opentelemetry.sdk.metrics.data.DoubleSumData;
import io.opentelemetry.sdk.metrics.data.DoubleSummaryData;
import io.opentelemetry.sdk.metrics.data.LongSumData;
import io.opentelemetry.sdk.metrics.data.MetricData;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

    String name = "Metric Name";
    String description = "Metric Description";
    String unit = "ns";
    MetricData metricData =
        MetricData.createDoubleSummary(
            aGceResource,
            anInstrumentationLibraryInfo,
            name,
            description,
            unit,
            DoubleSummaryData.create(ImmutableList.of(aDoubleSummaryPoint)));

    MetricDescriptor actualDescriptor =
        MetricTranslator.mapMetricDescriptor(metricData, aLongPoint);
    assertNull(actualDescriptor);
  }

  @Test
  public void testMapMetricDescriptorWithDeltaSumReturnsNull() {
    String name = "Metric Name";
    String description = "Metric Description";
    String unit = "ns";
    MetricData metricData =
        MetricData.createDoubleSum(
            aGceResource,
            anInstrumentationLibraryInfo,
            name,
            description,
            unit,
            DoubleSumData.create(
                true, AggregationTemporality.DELTA, ImmutableList.of(aDoublePoint)));