title: How to convert a Scala Iterable into Java util.List?
body: <p>I have a written a method in Scala that is using a method written in Java -  <code>processSale()</code> method takes <code>util.List&lt;Sale&gt;</code> as a parameter. </p>
  
  <p>But after <code>groupByKey()</code> I'm getting an <code>RDD[(String, Iterable[Sale])]</code>. I've tried to import <code>scala.collection.JavaConverters._</code> and do <code>SaleParser.processSale(a.asJava)</code>. </p>
  
  <p>However it gives me an <code>Iterable[Sale]</code>. How is it possible to convert it into a Java <code>util.List</code>?</p>
  
  <pre><code>val parseSales: RDD[(String, Sale)] = rawSales
        .map(sale =&gt; sale.Id -&gt; sale)
        .groupByKey()
        .mapValues(a =&gt; SaleParser.processSale(???))
  </code></pre>