title: How can I access the internal variable of a method in Java junit?
body: <p>I have a function in which a random number is generated as shown below</p>
  <pre><code>public void method(){
       int number = random();
       // continue
  }
  </code></pre>
  <p>My question is how can I access this variable without mocking random method?</p>
  <p>I need this variable for my test scenarios.</p>