### Question:
MetricAdapter { static MetricFamilySamples toMetricFamilySamples(MetricData metricData) { String cleanMetricName = cleanMetricName(metricData.getName()); Collector.Type type = toMetricFamilyType(metricData.getType()); return new MetricFamilySamples( cleanMetricName, type, metricData.getDescription(), toSamples(cleanMetricName, metricData.getType(), metricData.getPoints())); } private  MetricAdapter();   }### Answer:
@Test void toMetricFamilySamples() { MetricData metricData = MetricData.create( Resource.create(Attributes.of(stringKey("kr"), "vr")), InstrumentationLibraryInfo.create("full", "version"), "instrument.name", "description", "1", MetricData.Type.MONOTONIC_DOUBLE, Collections.singletonList( MetricData.DoublePoint.create(123, 456, Labels.of("kp", "vp"), 5))); assertThat(MetricAdapter.toMetricFamilySamples(metricData)) .isEqualTo( new MetricFamilySamples( "instrument_name", Collector.Type.COUNTER, metricData.getDescription(), ImmutableList.of( new Sample( "instrument_name", ImmutableList.of("kp"), ImmutableList.of("vp"), 5)))); }