@ SuppressWarnings ( "all" ) public static Method findMethodOrThrowException ( Class < ? > type , String methodName , Class < ? > ... parameterTypes ) { Method methodToMock = findMethod ( type , methodName , parameterTypes ) ; throwExceptionIfMethodWasNotFound ( type , methodName , methodToMock , ( Object [ ] ) parameterTypes ) ; return methodToMock ; }
Find method or throw exception .