code: @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;
      }
docs: Find method or throw exception.
  
  @param type           the type
  @param methodName     the method name
  @param parameterTypes the parameter types
  @return the method