private ExpectedTypesProvider.ExpectedClassProvider createOccurrenceClassProvider() {
    final Set<PsiClass> occurrenceClasses = new HashSet<>();
    DumbService.getInstance(myProject)
      .withAlternativeResolveEnabled(() -> {
        for (final PsiExpression occurrence : myOccurrences) {
          final PsiType occurrenceType = occurrence.getType();
          collectOccurrenceClasses(occurrenceClasses, occurrenceType);
        }
      });
    return new ExpectedTypeUtil.ExpectedClassesFromSetProvider(occurrenceClasses);
  }
private ExpectedTypesProvider.ExpectedClassProvider createOccurrenceClassProvider()