private void validate(ApplicationPackage appPkg) throws IOException {
        if (!validate) {
            return;
        }
        SchemaValidators schemaValidators = new SchemaValidators(new Version(VespaVersion.major));
        if (appPkg.getHosts() != null) {
            schemaValidators.hostsXmlValidator().validate(appPkg.getHosts());
        }
        schemaValidators.servicesXmlValidator().validate(appPkg.getServices());
    }
Build a model given a deploy state.

@param deployState An instance of {@link com.yahoo.config.model.deploy.DeployState}
@return a producer root capable of answering getConfig requests.
config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java