docs: private static Class<?> findTypeFromGenericInArguments(final InvocationOnMock invocation, final TypeVariable returnType) {
          final Type[] parameterTypes = invocation.getMethod().getGenericParameterTypes();
          for (int i = 0; i < parameterTypes.length; i++) {
              Type argType = parameterTypes[i];
              if (returnType.equals(argType)) {
                  Object argument = invocation.getArgument(i);
  
                  if (argument == null) {
                      return null;
                  }
  
                  return argument.getClass();
              }
              if (argType instanceof GenericArrayType) {
                  argType = ((GenericArrayType) argType).getGenericComponentType();
                  if (returnType.equals(argType)) {
                      return invocation.getArgument(i).getClass();
                  }
              }
          }
          return null;
      }