@@ -0,0 +1,1634 @@
+package com.yahoo.vespa.model.admin.metricsproxy;%0A%0Aimport com.yahoo.vespa.model.VespaModel;%0Aimport com.yahoo.vespa.model.test.VespaModelTester;%0Aimport org.junit.Test;%0A%0Aimport static com.yahoo.config.model.api.container.ContainerServiceType.METRICS_PROXY_CONTAINER;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.notNullValue;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * @author gjoranv%0A */%0Apublic class MetricsProxyContainerClusterTest %7B%0A%0A    @Test%0A    public void one_metrics_proxy_container_is_added_to_every_node() %7B%0A        var numberOfHosts = 4;%0A        var tester = new VespaModelTester();%0A        tester.enableMetricsProxyContainer(true);%0A        tester.addHosts(4);%0A%0A        VespaModel model = tester.createModel(servicesXml(), true);%0A        assertThat(model.getRoot().getHostSystem().getHosts().size(), is(numberOfHosts));%0A%0A        for (var host : model.getHostSystem().getHosts()) %7B%0A            assertThat(host.getService(METRICS_PROXY_CONTAINER.serviceName), notNullValue());%0A        %7D%0A%0A    %7D%0A%0A    private String servicesXml() %7B%0A        return String.join(%22%5Cn%22, %22%3C?xml version='1.0' encoding='utf-8' ?%3E%22,%0A                           %22%3Cservices%3E%22,%0A                           %22  %3Ccontainer version='1.0' id='foo'%3E%22,%0A                           %22    %3Cnodes count='2'/%3E%22,%0A                           %22  %3C/container%3E%22,%0A                           %22  %3Ccontent id='my-content' version='1.0'%3E%22,%0A                           %22    %3Cdocuments /%3E%22,%0A                           %22    %3Cnodes count='2'/%3E%22,%0A                           %22  %3C/content%3E%22,%0A                           %22%3C/services%3E%22);%0A    %7D%0A%7D%0A

Add simple unit test for MetricsProxyContainer.