title: Mock static methods
body: <p>I have a static method in a class. the method is not final. I keep getting a when() requires an argument which has to be 'a method call on a mock' error. Below is my code.</p>
  
  <pre><code>mockStatic(HomefeedExperimentUtils.class);
  
  when(HomefeedExperimentUtils.getGroupAndActivateExperiment(
      "link_stock_signal_filter_exp")).thenReturn(
      "treatment");
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>HomefeedExperimentUtils mock = org.mockito.Mockito.mock(HomefeedExperimentUtils.class);
  
  when(mock.getGroupAndActivateExperiment(
      "link_stock_signal_filter_exp")).thenReturn(
      "treatment");
  </code></pre>
  
  <p>Any help with be appreciated.</p>
  
  <p>Thanks!</p>