title: Mockito set private property
body: <p>I have a small problem with Mockito. Let's say I have this code :</p>
  
  <pre><code>MyObject object = mock(MyObject.class);
  System.out.println("PROPERTY 1 BRUT VALUE : " + property1Value);
  object.setProperty1(property1Value);
  System.out.println("PROPERTY 1 VALUE BEFORE STUB : " + object.getProperty1());
  when(object.getProperty1()).thenReturn(property1Value);
  System.out.println("PROPERTY 1 VALUE AFTER STUB : " + object.getProperty1());
  
  PROPERTY 1 BRUT VALUE : 150.0
  PROPERTY 1 VALUE BEFORE STUB : 0.0
  PROPERTY 1 VALUE AFTER STUB : 150.0
  </code></pre>
  
  <p>The problem is that my object property is not set directly. I have a method in MyObject that uses it and it always return 0. It is not possible to set directly an object property if it is mocked ?</p>
  
  <p>Found nothing on the documentation on this point.</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT 1</strong> : Here is the method in MyObject that uses the property set by Mockito</p>
  
  <pre><code>public Double getProperty1X2() {
      return 2 * property1;
  }
  </code></pre>
  
  <p>This method returns 0 in my tests, even if I set the property value. Maybe because it is using the field directly and not the getter ?</p>