@NotNull
  public static PsiClassType createGenericType(@NotNull String fqn, @NotNull PsiElement context, @Nullable PsiType type) {
    JavaPsiFacade facade = JavaPsiFacade.getInstance(context.getProject());
    GlobalSearchScope resolveScope = context.getResolveScope();
    PsiClass clazz = facade.findClass(fqn, resolveScope);
    if (clazz == null || clazz.getTypeParameters().length != 1) {
      return facade.getElementFactory().createTypeByFQClassName(fqn, resolveScope);
    }
    return type == null ? facade.getElementFactory().createType(clazz) : facade.getElementFactory().createType(clazz, type);
  }
@NotNull
  public static PsiClassType createGenericType(@NotNull String fqn, @NotNull PsiElement context, @Nullable PsiType type)