title: Mocking static class
body: <p>I have a method in a class that instantiate a static class instance and call operation on it.</p>
  
  <pre><code>public class SomeClass {
      public void someMethod() {
         MyClass.MyStaticClass myStaticClassInstance =
            new MyClass.MyStaticClass( arg1, arg2, arg3 );
         myStaticClassInstance.callSomeMethod();
      }
  }
  
  public class MyClass {
  
     public static class MyStaticClass {
  
        public MyStaticClass( Object arg1, Object arg2, Object arg3 ) {
        }
  
        public void callSomeMethod() {
        }
     }
  }
  </code></pre>
  
  <p>How to mock static class instanciation, so that I could mock <code>callSomeMethod()</code> without going through the static class constructor ?</p>