title: View.getContext() returns null after constructor View(context) in a JUnit test
body: <p>I don't understand why <code>View.getContext()</code> returns null in this case:</p>
  
  <pre><code>    @Mock
      Context mContext;
  
      @Mock
      SensorManager mSensorManager;
  
      @Before
      public void setup() {
          MockitoAnnotations.initMocks(this);
  
      }
  </code></pre>
  
  <p>//...</p>
  
  <pre><code>@Test
  public void initWithContext() throws Exception {
      assertNotNull(mContext);
      assertNotNull(mSensorManager);
      when(mContext.getSystemService(Context.SENSOR_SERVICE)).thenReturn(mSensorManager);
  
      ImageView imageView = new ImageView(mContext);
      assertNotNull(imageView);
      assertNotNull(imageView.getContext()); // Error because getContext() is null
  }
  </code></pre>
  
  <p>First lines of <code>View</code> constructor:</p>
  
  <pre><code>public View(Context context) {
      mContext = context;
  </code></pre>
  
  <p>Method <code>getContext()</code> </p>
  
  <pre><code>    @ViewDebug.CapturedViewProperty
      public final Context getContext() {
          return mContext;
      }
  </code></pre>
  
  <p>I am not mocking the ImageView, why  View.getContext() returns null then?</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>when(imageView.getContext()).thenReturn(mContext);
  assertNotNull(imageView.getContext()); //Error, imageView.getContext() returns null
  </code></pre>