@Test
    void testAdminV2OnHosted() {
        String services = """
                <services>\
                  <admin version='2.0'>\
                    <adminserver hostalias='node0' />\
                    <logserver hostalias='node0' />\
                    <metrics>
                      <consumer id="my-custom-consumer">
                        <metric-set id="default" />
                        <metric id="vds.idealstate.garbage_collection.documents_removed.count" />
                      </consumer>
                    </metrics>\
                  </admin>\
                  <container id='default' version='1.0'>\
                    <search /> \
                    <nodes> \
                      <node hostalias='node1' /> \
                    </nodes>\
                  </container>\
                </services>""";

        // Deprecated elements should be logged as warning
        var logged = new StringBuilder();
        DeployLogger logger = (level, message) -> {
            if (level.equals(Level.WARNING) && message.contains("<admin>")) logged.append(message);
        };

        var builder = new DeployState.Builder()
                .deployLogger(logger)
                .properties(new TestProperties().setHostedVespa(true))
                .endpoints(Set.of(new ContainerEndpoint("default", ApplicationClusterEndpoint.Scope.zone, List.of("default.example.com"))));
        new VespaModelCreatorWithMockPkg(null, services).create(builder);

        assertEquals("Elements 'adminserver', 'logserver' in <admin> are deprecated and ignored, please remove",
                     logged.toString());
    }
Test that a very simple config with only adminserver tag creates
adminserver, logserver, configserver and slobroks
config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java