@Override
  @RequiresEdt
  public int showChooseDialog(@Nullable Project project,
                              @Nullable Component parentComponent,
                              String message,
                              String title,
                              String[] values,
                              String initialValue,
                              @Nullable Icon icon) {
    if (isApplicationInUnitTestOrHeadless()) {
      return TestDialogManager.getTestImplementation().show(message);
    }

    @SuppressWarnings("deprecation") ChooseDialog dialog = new ChooseDialog(project, parentComponent, message, title, icon, values, initialValue);
    dialog.show();
    return dialog.getSelectedIndex();
  }
@Override
  @RequiresEdt
  public int showChooseDialog(@Nullable Project project,
                              @Nullable Component parentComponent,
                              String message,
                              String title,
                              String[] values,
                              String initialValue,
                              @Nullable Icon icon)