### Question:
KMeansPMMLUtils { public static void validatePMMLVsSchema(PMML pmml, InputSchema schema) { List<Model> models = pmml.getModels(); Preconditions.checkArgument(models.size() == 1, "Should have exactly one model, but had %s", models.size()); Model model = models.get(0); Preconditions.checkArgument(model instanceof ClusteringModel); Preconditions.checkArgument(model.getMiningFunction() == MiningFunction.CLUSTERING); DataDictionary dictionary = pmml.getDataDictionary(); Preconditions.checkArgument( schema.getFeatureNames().equals(AppPMMLUtils.getFeatureNames(dictionary)), "Feature names in schema don't match names in PMML"); MiningSchema miningSchema = model.getMiningSchema(); Preconditions.checkArgument(schema.getFeatureNames().equals( AppPMMLUtils.getFeatureNames(miningSchema))); } private  KMeansPMMLUtils(); static void validatePMMLVsSchema(PMML pmml, InputSchema schema); static List<ClusterInfo> read(PMML pmml);  }### Answer:
@Test public void testClustering() { PMML pmml = buildDummyClusteringModel(); Map<String,Object> overlayConfig = new HashMap<>(); overlayConfig.put("oryx.input-schema.feature-names", "[\"x\",\"y\"]"); overlayConfig.put("oryx.input-schema.num-features", 2); overlayConfig.put("oryx.input-schema.categorical-features", "[]"); Config config = ConfigUtils.overlayOn(overlayConfig, ConfigUtils.getDefault()); InputSchema schema = new InputSchema(config); KMeansPMMLUtils.validatePMMLVsSchema(pmml, schema); }