@Test
    void fail_if_http_port_is_not_default_in_hosted_vespa() throws Exception {
        try {
            String servicesXml =
                    "<services>" +
                            "<admin version='3.0'>" +
                            "    <nodes count='1'/>" +
                            "</admin>" +
                            "<container version='1.0'>" +
                            "  <http>" +
                            "    <server port='9000' id='foo' />" +
                            "  </http>" +
                            nodesXml +
                            "</container>" +
                            "</services>";
            ApplicationPackage applicationPackage = new MockApplicationPackage.Builder().withServices(servicesXml).build();
            // Need to create VespaModel to make deploy properties have effect
            TestLogger logger = new TestLogger();
            new VespaModel(new NullConfigModelRegistry(), new DeployState.Builder()
                    .applicationPackage(applicationPackage)
                    .deployLogger(logger)
                    .properties(new TestProperties().setHostedVespa(true))
                    .build());
            fail("Expected exception");
        }
        catch (IllegalArgumentException e) {
            // Success
            assertEquals("Illegal port 9000 in http server 'foo': Port must be set to " + getDefaults().vespaWebServicePort(),
                    e.getMessage());
        }
    }
Tests for "core functionality" of the container model, e.g. ports, or the 'components' and 'bundles' configs.

Before adding a new test to this class, check if the test fits into one of the other existing subclasses
of {@link ContainerModelBuilderTestBase}. If not, consider creating a new subclass.

@author gjoranv
config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilderTest.java