@ApiStatus.Internal
  public static @NotNull CompletionAssertions.WatchingInsertionContext createInsertionContext(@Nullable List<LookupElement> lookupItems,
                                                                                              char completionChar,
                                                                                              Editor editor,
                                                                                              PsiFile psiFile,
                                                                                              int startOffset,
                                                                                              int caretOffset,
                                                                                              int idEndOffset,
                                                                                              OffsetMap offsetMap) {

    offsetMap.addOffset(CompletionInitializationContext.START_OFFSET, startOffset);
    offsetMap.addOffset(CompletionInitializationContext.SELECTION_END_OFFSET, caretOffset);
    offsetMap.addOffset(CompletionInitializationContext.IDENTIFIER_END_OFFSET, idEndOffset);

    List<LookupElement> items = lookupItems == null ? Collections.emptyList() : lookupItems;

    return new CompletionAssertions.WatchingInsertionContext(offsetMap, psiFile, completionChar, items, editor);
  }
@ApiStatus.Internal
  public static @NotNull CompletionAssertions.WatchingInsertionContext createInsertionContext(@Nullable List<LookupElement> lookupItems,
                                                                                              char completionChar,
                                                                                              Editor editor,
                                                                                              PsiFile psiFile,
                                                                                              int startOffset,
                                                                                              int caretOffset,
                                                                                              int idEndOffset,
                                                                                              OffsetMap offsetMap)