### Question:
KMeansPMMLUtils { public static List<ClusterInfo> read(PMML pmml) { Model model = pmml.getModels().get(0); Preconditions.checkArgument(model instanceof ClusteringModel); ClusteringModel clusteringModel = (ClusteringModel) model; return clusteringModel.getClusters().stream().map(cluster -> new ClusterInfo(Integer.parseInt(cluster.getId()), VectorMath.parseVector( TextUtils.parseDelimited(cluster.getArray().getValue().toString(), ' ')), cluster.getSize()) ).collect(Collectors.toList()); } private  KMeansPMMLUtils(); static void validatePMMLVsSchema(PMML pmml, InputSchema schema); static List<ClusterInfo> read(PMML pmml);  }### Answer:
@Test public void testPMMLToClusters() { PMML pmml = buildDummyClusteringModel(); List<ClusterInfo> clusterInfoList = KMeansPMMLUtils.read(pmml); assertEquals(NUM_CLUSTERS, clusterInfoList.size()); assertEquals(NUM_DIMENSIONS, clusterInfoList.get(0).getCenter().length); assertEquals(CLUSTER_SIZE, clusterInfoList.get(1).getCount()); }