public static synchronized < T > IExpectationSetters < T > expectPrivate ( Object instance , String methodName , Object ... arguments ) throws Exception { if ( instance == null ) { throw new IllegalArgumentException ( "Instance or class cannot be null." ) ; } return expectPrivate ( instance , methodName , Whitebox . getType ( instance ) , arguments ) ; }
Used to specify expectations on methods using the method name . Works on for example private or package private methods .