Need to write junit for scala code : I am new to scala and spark.  Actually I need to write junit for the word count program of my scala code.My code looks like this.

    import org.apache.spark.SparkContext
    import org.apache.spark.SparkContext._
    import org.apache.spark._
    
    object SparkWordCount {
      def main(args: Array[String]) {
    
        meth()

  }

    def meth()
  {

    //Spark Config object having cluster information
    val sparkConfig = new SparkConf()
      .setAppName("SparkWordCount")
      .setMaster("local")

    val sc = new SparkContext(sparkConfig)

    val input = sc.textFile("C:\\SparkW\\input\\inp.txt")
    val count = input.flatMap(line ⇒ line.split(" "))
      .map(word ⇒ (word, 1))
      .reduceByKey(_ + _)
    count.saveAsTextFile("outfile")
    System.out.println("OK");
  }
}

Can you please help me to write junit for above code.
