Mock Build Version with Mockito
<p>My target is to mock Build.Version.SDK_INT with Mockito. Already tried:</p>

<pre><code>final Build.VERSION buildVersion = Mockito.mock(Build.VERSION.class);
doReturn(buildVersion.getClass()).when(buildVersion).getClass();
doReturn(16).when(buildVersion.SDK_INT);
</code></pre>

<p>Problem is that: when requires method after mock, and .SDK_INT is not a method.</p>