code: @SuppressWarnings("unchecked")
      private static <T> Constructor<T> getPotentialVarArgsConstructor(Class<T> classThatContainsTheConstructorToTest,
                                                                       Object... arguments) {
          Constructor<T>[] declaredConstructors = (Constructor<T>[]) classThatContainsTheConstructorToTest
                                                                             .getDeclaredConstructors();
          for (Constructor<T> possibleVarArgsConstructor : declaredConstructors) {
              if (possibleVarArgsConstructor.isVarArgs()) {
                  if (arguments == null || arguments.length == 0) {
                      return possibleVarArgsConstructor;
                  } else {
                      Class<?>[] parameterTypes = possibleVarArgsConstructor.getParameterTypes();
                      if (parameterTypes[parameterTypes.length - 1].getComponentType().isAssignableFrom(
                              getType(arguments[0]))) {
                          return possibleVarArgsConstructor;
                      }
                  }
              }
          }
          return null;
      }
docs: Gets the potential var args constructor.
  
  @param <T>                                   the generic type
  @param classThatContainsTheConstructorToTest the class that contains the constructor to test
  @param arguments                             the arguments
  @return the potential var args constructor