@NotNull
  public static PsiClassType getExpectedGenericType(PsiElement context,
                                                    PsiClass aClass,
                                                    PsiClassType expectedType) {
    List<PsiType> arguments = getExpectedTypeArguments(context, aClass, Arrays.asList(aClass.getTypeParameters()), expectedType);
    return JavaPsiFacade.getElementFactory(context.getProject()).createType(aClass, arguments.toArray(PsiType.EMPTY_ARRAY));
  }
@NotNull
  public static PsiClassType getExpectedGenericType(PsiElement context,
                                                    PsiClass aClass,
                                                    PsiClassType expectedType)