title: how to ensure good test-coverage with void methods
body: <pre><code>public interface MessageProducer {
      public void produce(String message);
      public Map&lt;String, Set&lt;String&gt;&gt; getMessagesMapped();
  } 
  
  public MessageProducerImpl {
     @Override
     public void produce(String message) {
         //code logic here calls private class methods to manipulate messages
     }
  
  @Override
  public Map&lt;String, Set&lt;String&gt;&gt; getMessagesMapped() {
      return map;
  }
  }
  </code></pre>
  
  <p>How should one test-drive a scenario like the above and ensure good test coverage when:</p>
  
  <ul>
  <li>Entry point <code>produce()</code> is void complying to contract defined by interface and has no return type.</li>
  <li>other methods are <code>private</code> in the <code>MessageProducerImpl</code> class</li>
  <li>Not allowed to change interface </li>
  </ul>