public static @NotNull String extractSubject(@NotNull String message) {
    int subjectIndex = message.indexOf('\n');
    return subjectIndex == -1 ? message : message.substring(0, subjectIndex);
  }
public static @NotNull String extractSubject(@NotNull String message)