### Question:
MetricAdapter { static Collector.Type toMetricFamilyType(MetricData.Type type) { switch (type) { case NON_MONOTONIC_LONG: case NON_MONOTONIC_DOUBLE: return Collector.Type.GAUGE; case MONOTONIC_LONG: case MONOTONIC_DOUBLE: return Collector.Type.COUNTER; case SUMMARY: return Collector.Type.SUMMARY; } return Collector.Type.UNTYPED; } private  MetricAdapter();   }### Answer:
@Test void toProtoMetricDescriptorType() { assertThat(MetricAdapter.toMetricFamilyType(MetricData.Type.NON_MONOTONIC_DOUBLE)) .isEqualTo(Collector.Type.GAUGE); assertThat(MetricAdapter.toMetricFamilyType(MetricData.Type.NON_MONOTONIC_LONG)) .isEqualTo(Collector.Type.GAUGE); assertThat(MetricAdapter.toMetricFamilyType(MetricData.Type.MONOTONIC_DOUBLE)) .isEqualTo(Collector.Type.COUNTER); assertThat(MetricAdapter.toMetricFamilyType(MetricData.Type.MONOTONIC_LONG)) .isEqualTo(Collector.Type.COUNTER); assertThat(MetricAdapter.toMetricFamilyType(MetricData.Type.SUMMARY)) .isEqualTo(Collector.Type.SUMMARY); }