public Map<MetricId, Number> metrics() { return metrics; }
@Test
    public void builder_applies_output_names() {
        String ONE          = "one";
        String TWO          = "two";
        String THREE        = "three";
        String NON_EXISTENT = "non-existent";
        MetricId ONE_ID          = toMetricId(ONE);
        MetricId TWO_ID          = toMetricId(TWO);
        MetricId THREE_ID        = toMetricId(THREE);
        MetricId NON_EXISTENT_ID = toMetricId(NON_EXISTENT);

        Map<MetricId, List<MetricId>> outputNamesById = Map.of(
                ONE_ID,          List.of(ONE_ID),
                TWO_ID,          List.of(TWO_ID, toMetricId("dos")),
                THREE_ID,        List.of(toMetricId("3")),
                NON_EXISTENT_ID, List.of(NON_EXISTENT_ID));

        MetricsPacket packet = new MetricsPacket.Builder(toServiceId("foo"))
                .putMetrics(List.of(
                        new Metric(ONE_ID, 1),
                        new Metric(TWO_ID, 2),
                        new Metric(THREE_ID, 3)))
                .applyOutputNames(outputNamesById)
                .build();

        // Only original name
        assertTrue(packet.metrics().containsKey(ONE_ID));

        // Both names
        assertTrue(packet.metrics().containsKey(TWO_ID));
        assertTrue(packet.metrics().containsKey(toMetricId("dos")));

        // Only new name
        assertFalse(packet.metrics().containsKey(THREE_ID));
        assertTrue(packet.metrics().containsKey(toMetricId("3")));

        // Non-existent metric not added
        assertFalse(packet.metrics().containsKey(NON_EXISTENT_ID));
    }