@Test
    void vespa_consumer_id_is_allowed_for_hosted_infrastructure_applications() {
        String services = String.join("\n",
                "<services application-type='hosted-infrastructure'>",
                "    <admin version='4.0'>",
                "        <adminserver hostalias='node1'/>",
                "        <metrics>",
                "            <consumer id='Vespa'>",
                "                <metric id='custom.metric1'/>",
                "            </consumer>",
                "        </metrics>",
                "    </admin>",
                "</services>"
        );
        VespaModel hostedModel = getModel(services, hosted);
        ConsumersConfig config = consumersConfigFromModel(hostedModel);
        assertEquals(5, config.consumer().size());

        // All default metrics are retained
        ConsumersConfig.Consumer vespaConsumer = config.consumer(0);
        assertEquals(numMetricsForVespaConsumer + 1, vespaConsumer.metric().size());

        Metric customMetric1 = new Metric("custom.metric1");
        assertTrue(checkMetric(vespaConsumer, customMetric1), "Did not contain metric: " + customMetric1);
    }
Tests for {@link MetricsProxyContainerCluster} related to metrics consumers.

@author gjoranv
config-model/src/test/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsConsumersTest.java