public static <T> OngoingStubbing<T> when(Class<?> clazz, String methodToExpect, Object... arguments)
        throws Exception {
        return Mockito.when(Whitebox.<T>invokeMethod(clazz, methodToExpect, arguments));
    }
public static < T > OngoingStubbing < T > when ( Class < ? > clazz , String methodToExpect , Object ... arguments ) throws Exception { return Mockito . when ( Whitebox . < T > invokeMethod ( clazz , methodToExpect , arguments ) ) ; }
Expect a static private or inner class method call.

@throws Exception If something unexpected goes wrong.
@see PowerMockito#when(Object)