title: How to write test method for void method in junit easymock in java?
body: <p>I am unable to write easymock or expect for void methods.I want to writ test class for Board.Please anyone help in that..my class like this which is given below</p>
  
  <pre><code> public class Board{
      Snmp snmp;
      Board(Snmp snmp){
      this.snmp = new Snmp();
      }
      private void readTable() throws SnmpException {
              ArrayList&lt;String&gt; boardOIDs = new ArrayList&lt;String&gt;();
              List&lt;List&lt;String&gt;&gt; valuesList = new ArrayList&lt;List&lt;String&gt;&gt;();
              List&lt;List&lt;String&gt;&gt; oidsList = new ArrayList&lt;List&lt;String&gt;&gt;();
  
              boardOIDs.add(OID_BOARD_INDEX);
              boardOIDs.add(OID_BOARDNAME);
              boardOIDs.add(OID_BOARDTYPE);
  
              //this method read and put value into valueList
              snmp.snmpGetTable(boardOIDs, oidsList,valuesList);
  
              s.o.p( "Value List size" +valuesList.size);
  
      }       
      }
  </code></pre>