public VespaModel create(boolean validateApplicationWithSchema) {
        try {
            if (validateApplicationWithSchema) {
                validate();
            }
            DeployState deployState = new DeployState.Builder().applicationPackage(applicationPkg).build();
            VespaModel model = new VespaModel(configModelRegistry, deployState);
            // Validate, but without checking configSources or routing (routing
            // is constructed in a special way and cannot always be validated in
            // this step for unit tests)
            ValidationParameters validationParameters = new ValidationParameters(IgnoreValidationErrors.TRUE, FailOnIncompatibleChange.TRUE, CheckRouting.FALSE);
            new Validation().validate(model, validationParameters, deployState);
            return model;
        } catch (Exception e) {
            throw e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e);
        }
    }
For testing purposes only

@author Tony Vaagenes
config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java