@NotNull
  private static Notification createNotification(@NotNull NotificationGroup notificationGroup,
                                                 @NonNls @Nullable String displayId,
                                                 @NotificationTitle @NotNull String title,
                                                 @NotificationContent @NotNull String message,
                                                 @NotNull NotificationType type,
                                                 @Nullable NotificationListener listener) {
    // title can be empty; message can't be neither null, nor empty
    if (StringUtil.isEmptyOrSpaces(message)) {
      message = title;
      title = "";
    }
    // if both title and message were empty, then it is a problem in the calling code => Notifications engine assertion will notify.
    Notification notification = notificationGroup.createNotification(title, message, type);
    if (displayId != null && !displayId.isEmpty()) notification.setDisplayId(displayId);
    if (listener != null) notification.setListener(listener);
    return notification;
  }
@NotNull
  private static Notification createNotification(@NotNull NotificationGroup notificationGroup,
                                                 @NonNls @Nullable String displayId,
                                                 @NotificationTitle @NotNull String title,
                                                 @NotificationContent @NotNull String message,
                                                 @NotNull NotificationType type,
                                                 @Nullable NotificationListener listener)