### Question:
MLLibUtil { @Deprecated public static JavaRDD<LabeledPoint> fromDataSet(JavaSparkContext sc, JavaRDD<DataSet> data) { return data.map(new Function<DataSet, LabeledPoint>() { @Override public LabeledPoint call(DataSet pt) { return toLabeledPoint(pt); } }); } private  MLLibUtil(); static double toClassifierPrediction(Vector vector); static INDArray toMatrix(Matrix arr); static INDArray toVector(Vector arr); static Matrix toMatrix(INDArray arr); static Vector toVector(INDArray arr); static JavaRDD<LabeledPoint> fromBinary(JavaPairRDD<String, PortableDataStream> binaryFiles,
                    final RecordReader reader); static JavaRDD<LabeledPoint> fromBinary(JavaRDD<Tuple2<String, PortableDataStream>> binaryFiles,
                    final RecordReader reader); static LabeledPoint pointOf(Collection<Writable> writables); static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels,
                    long batchSize); @Deprecated static JavaRDD<DataSet> fromLabeledPoint(JavaSparkContext sc, JavaRDD<LabeledPoint> data,
                    final long numPossibleLabels); @Deprecated static JavaRDD<DataSet> fromContinuousLabeledPoint(JavaSparkContext sc, JavaRDD<LabeledPoint> data); @Deprecated static JavaRDD<LabeledPoint> fromDataSet(JavaSparkContext sc, JavaRDD<DataSet> data); static JavaRDD<DataSet> fromContinuousLabeledPoint(JavaRDD<LabeledPoint> data); static JavaRDD<DataSet> fromContinuousLabeledPoint(JavaRDD<LabeledPoint> data, boolean preCache); static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels); static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels,
                    boolean preCache); static JavaRDD<LabeledPoint> fromDataSet(JavaRDD<DataSet> data); static JavaRDD<LabeledPoint> fromDataSet(JavaRDD<DataSet> data, boolean preCache);  }### Answer:
@Test public void testMlLibTest() { DataSet dataSet = new IrisDataSetIterator(150, 150).next(); List<DataSet> list = dataSet.asList(); JavaRDD<DataSet> data = sc.parallelize(list); JavaRDD<LabeledPoint> mllLibData = MLLibUtil.fromDataSet(sc, data); }