title: Why mockStatic doesn't behave as expected?
body: <p>mockito-core version: 1.10.19</p>
  
  <p>powermock version: 1.6.6</p>
  
  <p>I try to mock some static methods, but the output confuses me.
  Here is my code:</p>
  
  <pre><code>class ClassWithStatics {
      public static int getNextInt() {
          return getInt() + 1;
      }
  
      public static int getInt() {
          return 1;
      }
  
      public static long getTime() {
          return System.currentTimeMillis();
      }
  }
  
  @RunWith(PowerMockRunner.class)
  @PrepareForTest({ClassWithStatics.class, System.class})
  public class StubJustOneStatic {
      @Test
      public void test() {
          PowerMockito.mockStatic(ClassWithStatics.class);
          Mockito.when(ClassWithStatics.getInt()).thenReturn(0);
  
          PowerMockito.mockStatic(System.class);
          Mockito.when(System.currentTimeMillis()).thenReturn(12345L);
  
          System.out.println("Next Int: " + ClassWithStatics.getNextInt());
          System.out.println("Int: " + ClassWithStatics.getInt());
          System.out.println("Time:" + ClassWithStatics.getTime());
      }
  }
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>Next Int: 0
  Int: 0
  Time:0
  </code></pre>
  
  <p>But when i use the following code,  <code>ClassWithStatics.getTime()</code> prints exactly what i want.</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest({ClassWithStatics.class, System.class})
  public class StubJustOneStatic {
      @Test
      public void test() {
           //  PowerMockito.mockStatic(ClassWithStatics.class);
           //  Mockito.when(ClassWithStatics.getInt()).thenReturn(0);
  
          PowerMockito.mockStatic(System.class);
          Mockito.when(System.currentTimeMillis()).thenReturn(12345L);
  
          //  System.out.println("Next Int: " + ClassWithStatics.getNextInt());
          //  System.out.println("Int: " + ClassWithStatics.getInt());
          System.out.println("Time:" + ClassWithStatics.getTime());
      }
  }
  </code></pre>
  
  <p>Thanks a lot.</p>