### Question:
AppPMMLUtils { public static MiningSchema buildMiningSchema(InputSchema schema) { return buildMiningSchema(schema, null); } private  AppPMMLUtils(); static String getExtensionValue(PMML pmml, String name); static List<String> getExtensionContent(PMML pmml, String name); static void addExtension(PMML pmml, String key, Object value); static void addExtensionContent(PMML pmml, String key, Collection<?> content); static Array toArray(double... values); static MiningSchema buildMiningSchema(InputSchema schema); static MiningSchema buildMiningSchema(InputSchema schema, double[] importances); static List<String> getFeatureNames(MiningSchema miningSchema); static Integer findTargetIndex(MiningSchema miningSchema); static DataDictionary buildDataDictionary(
      InputSchema schema,
      CategoricalValueEncodings categoricalValueEncodings); static List<String> getFeatureNames(DataDictionary dictionary); static CategoricalValueEncodings buildCategoricalValueEncodings(
      DataDictionary dictionary); static PMML readPMMLFromUpdateKeyMessage(String key,
                                                  String message,
                                                  Configuration hadoopConf);  }### Answer:
@Test public void testBuildMiningSchema() { MiningSchema miningSchema = AppPMMLUtils.buildMiningSchema(buildTestSchema()); List<MiningField> miningFields = miningSchema.getMiningFields(); assertEquals(4, miningFields.size()); String[] fieldNames = { "foo", "bar", "baz", "bing" }; for (int i = 0; i < fieldNames.length; i++) { assertEquals(fieldNames[i], miningFields.get(i).getName().getValue()); } assertEquals(MiningField.UsageType.SUPPLEMENTARY, miningFields.get(0).getUsageType()); assertEquals(MiningField.UsageType.PREDICTED, miningFields.get(1).getUsageType()); assertEquals(MiningField.UsageType.SUPPLEMENTARY, miningFields.get(2).getUsageType()); assertEquals(MiningField.UsageType.ACTIVE, miningFields.get(3).getUsageType()); assertEquals(OpType.CATEGORICAL, miningFields.get(1).getOpType()); assertEquals(OpType.CONTINUOUS, miningFields.get(3).getOpType()); }