title: How to mock method's local variables/variable methods using Mockito
body: <p>I have a class named <code>A</code> and method <code>method1()</code> in it:</p>
  
  <pre><code>Class A{
  
      boolean method1(String path){
          File procDir = new File(path);
          if(!procDir.exists()){
              return false`;
          }
          if(!procDir.canRead()){
              return false;
          }
      }
  }
  </code></pre>
  
  <p>Considering above code would anyone suggest, the way to mack the method1 and inner method/variables (<code>procDir.canRead()</code>) .</p>