title: Write a mockito test for void method
body: <p>I am trying to write a test case for a method which is very badly written, below is implementation of the method: </p>
  
  <pre><code>public void processData(){
   DB.connectToDB1();
   List rawData = DB.getRawData();
   List processedData = new List(); 
   for (Object obj : rawData){
    //pass through filter
    if(obj.passesFilter){
     processedData.add(obj);
    }
   }
   DB.connectToDB2();
   DB.insertProcessedData(processedData);
  }
  </code></pre>
  
  <p>I want to test if filter rules are working correctly, what approach should i take?</p>