title: mock anonymous inner class to change outer local final variable
body: <p>I have the following code snippet where the inner anonymous class will change the outer local final variable.</p>
  
  <p>I want to write unite test code for this code snippet, I can write a test proxy and define my callStoredProcedure within it, although I can't figure out how I can change the outer final variable as the anonymous class does there</p>
  
  <p>I am using Mockito, Any clue?</p>
  
  <pre><code>        final List&lt;String&gt; result = new ArrayList&lt;String&gt;();
  
          proxy.callStoredProcedure(param1, param2,
                  param3, resolveSQL(param4),
                  new IProxyExtractor&lt;GenericDTO&gt;() {
  
                      @Override
                      public List&lt;GenericDTO&gt; extract(
                              final int resultSetindex, final ResultSet rs)
                              throws SQLException {
                          while (rs.next()) {
                              result.add(rs.getString(1));
                          }
  
                          return Arrays
                                  .asList(new GenericDTO[] { new ABCDTO() });
                      }
                  }, param5, param6);
  </code></pre>