### Question:
LoggingMetricExporter implements MetricExporter { @Override public CompletableResultCode export(Collection<MetricData> metrics) { logger.info("Received a collection of " + metrics.size() + " metrics for export."); for (MetricData metricData : metrics) { logger.log(Level.INFO, "metric: {0}", metricData); } return CompletableResultCode.ofSuccess(); }  @Override CompletableResultCode export(Collection<MetricData> metrics); @Override CompletableResultCode flush(); @Override void shutdown();  }### Answer:
@Test void testExport() { long nowEpochNanos = System.currentTimeMillis() * 1000 * 1000; Resource resource = Resource.create(Attributes.of(stringKey("host"), "localhost")); InstrumentationLibraryInfo instrumentationLibraryInfo = InstrumentationLibraryInfo.create("manualInstrumentation", "1.0"); exporter.export( Arrays.asList( MetricData.create( resource, instrumentationLibraryInfo, "measureOne", "A summarized test measure", "ms", MetricData.Type.SUMMARY, Collections.singletonList( SummaryPoint.create( nowEpochNanos, nowEpochNanos + 245, Labels.of("a", "b", "c", "d"), 1010, 50000, Arrays.asList( ValueAtPercentile.create(0.0, 25), ValueAtPercentile.create(100.0, 433))))), MetricData.create( resource, instrumentationLibraryInfo, "counterOne", "A simple counter", "one", MetricData.Type.MONOTONIC_LONG, Collections.singletonList( LongPoint.create( nowEpochNanos, nowEpochNanos + 245, Labels.of("z", "y", "x", "w"), 1010))), MetricData.create( resource, instrumentationLibraryInfo, "observedValue", "an observer gauge", "kb", MetricData.Type.NON_MONOTONIC_DOUBLE, Collections.singletonList( DoublePoint.create( nowEpochNanos, nowEpochNanos + 245, Labels.of("1", "2", "3", "4"), 33.7767))))); }