### Question:
SamplingBN { public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); String file = "networks/simulated/WasteIncinerator.bn"; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile(file); System.out.println(bn); int nSamples = 1000; int parallelism = 4; BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataSpark data = sampler.sampleToDataSpark(jsc, nSamples, parallelism); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/WI_samples.json", sqlContext); }  static void main(String[] args);  }### Answer:
@Test public void test() throws Exception { SamplingBN.main(null); }