@Test(expected = InvalidApplicationException.class)
    public void testDeploymentFailsIfNeededModelVersionFails() {
        List<Host> hosts = createHosts(7, "7.0.0");

        List<ModelFactory> modelFactories = List.of(createFailingModelFactory(Version.fromString("7.0.0")),
                                                    createHostedModelFactory(Version.fromString("7.1.0")));

        DeployTester tester = createTester(hosts, modelFactories, prodZone);
        tester.deployApp("src/test/apps/hosted/", "7.1.0");
    }
Tests that we fail deployment if a needed model version fails to be created
configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java