title: Junit for my static method using PowerMock failing : org.mockito.exceptions.misusing.MissingMethodInvocationException
body: <p>Complete error :</p>
  <pre><code>org.mockito.exceptions.misusing.MissingMethodInvocationException:when() requires an argument which has to be 'a method call on a mock'  
  </code></pre>
  <p>This is the method I am trying to cover :</p>
  <pre><code> public static String getCurrentTimeStamp() {
      Date date = new Date();
      DateFormat formatter = new SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss&quot;, Locale.ENGLISH);
      formatter.setTimeZone(TimeZone.getTimeZone(&quot;EST&quot;));
      return formatter.format(date);
  }
  </code></pre>
  <p>Test case I am using :</p>
  <pre><code>    SearchService es = PowerMockito.mock(SearchService.class);
      PowerMockito.when(es.getCurrentTimeStamp()).thenReturn(&quot;2020-10-10 10:12:30&quot;);
  </code></pre>