title: Mock System.class per method in Junit
body: <p>I am facing issue to get the <code>System.getProperty("name")</code> value per method vise after mocking <code>System.class</code>
  Example:</p>
  
  <pre><code>@Test
  public void Test1()throws Exception {
      PowerMockito.mockStatic(System.class);
      // Configuration
      when(System.getProperty("os.name")).thenReturn("Win");
  }
  @Test
  public void Test2() throws Exception {
      PowerMockito.mockStatic(System.class);
      when(System.getProperty("os.name")).thenReturn("Linux");
  }
  </code></pre>
  
  <p>We have two tests method as mentioned above when we are running both the method independently then we are getting correct value of <code>System.getProperty("os.name")</code>. But when we are running class (will execute both method in class) then we are getting first method's <code>System.getProperty("os.name")</code> value in second method. 
  Please suggest.</p>
  
  <p>Thank in advance.</p>