public static < T > OngoingStubbing < T > when ( Class < ? > klass , Object ... arguments ) throws Exception { return Mockito . when ( Whitebox . < T > invokeMethod ( klass , arguments ) ) ; }
Expect calls to private static methods without having to specify the method name . The method will be looked up using the parameter types if possible