title: PowerMock, mock a static method, THEN call real methods on all other statics
body: <p>I'm setting up mocking a class' static methods.  I have to do this in a <code>@Before</code>-annotated JUnit setup method.</p>
  
  <p>My goal is to setup the class to call real methods, <strong>except</strong> for those methods I explicitly mock.</p>
  
  <p>Basically:</p>
  
  <pre><code>@Before
  public void setupStaticUtil() {
    PowerMockito.mockStatic(StaticUtilClass.class);
  
    // mock out certain methods...
    when(StaticUtilClass.someStaticMethod(anyString())).thenReturn(5); 
  
    // Now have all OTHER methods call the real implementation???  How do I do this?
  }
  </code></pre>
  
  <p>The problem I'm running into is that within <code>StaticUtilClass</code> the method <code>public static int someStaticMethod(String s)</code> unfortunately throws a <code>RuntimeException</code> if supplied with a <code>null</code> value.</p>
  
  <p>So I can't simply go the obvious route of calling real methods as the default answer as below:</p>
  
  <pre><code>@Before
  public void setupStaticUtil() {
    PowerMockito.mockStatic(StaticUtilClass.class, CALLS_REAL_METHODS); // Default to calling real static methods
  
    // The below call to someStaticMethod() will throw a RuntimeException, as the arg is null!
    // Even though I don't actually want to call the method, I just want to setup a mock result
    when(StaticUtilClass.someStaticMethod(antString())).thenReturn(5); 
  }
  </code></pre>
  
  <p>I need to set the default Answer to call real methods on all other static methods <strong>after</strong> I mock the results from the method I'm interested in mocking.</p>
  
  <p>Is this possible?  </p>