static <T> T withContainerModel(String servicesXml, ThrowingFunction<VespaModel, T> f) throws Exception {
        return withTempDirectory(applicationPath -> {
            writeServicesXml(applicationPath, servicesXml);

            LocalFileDb distributedFiles = new LocalFileDb(applicationPath);
            VespaModel root;
            Pair<VespaModel, com.yahoo.vespa.model.container.Container> rc = StandaloneContainerApplication.createContainerModel(
                    applicationPath, distributedFiles, applicationPath.resolve("preprocesedApp").toFile(), Networking.enable,
                    new ConfigModelRepo());
            root = rc.getFirst();
            return f.apply(root);
        });
    }
Creates a local application from vespa-services fragments.

@author Tony Vaagenes
@author ollivir
standalone-container/src/test/java/com/yahoo/container/standalone/StandaloneContainer.java