title: Mockito when().thenReturn() doesn't work properly
body: <p>I have a class A with 2 functions:
  function a() which returns a random number.
  function b() which calls a() and return the value returned.</p>
  
  <p>In a test I wrote this:</p>
  
  <pre><code>A test = Mockito.mock(A.class)
  Mockito.when(test.a()).thenReturn(35)
  assertEquals(35,test.a())
  assertEquals(35,test.b())
  </code></pre>
  
  <p>The test fails at the second assert. Does anyone know why?</p>
  
  <p>To be clear - this is not my real code, but a simple code to explain my problem</p>