private static void writeAdditionalInfo(@NotNull Writer writer,
                                          @NotNull String lineSeparator,
                                          @Nullable Map<String, CharSequence> additionalMap) throws IOException {
    if (additionalMap != null && !additionalMap.isEmpty()) {
      writer.write(ADDITIONAL_PREFIX);
      writer.write(lineSeparator);
      for (Map.Entry<String, CharSequence> entry : additionalMap.entrySet()) {
        writer.write(ADD_INFO_HEADER + entry.getKey());
        writer.write(lineSeparator);
        final String value = StringUtil.escapeStringCharacters(entry.getValue().toString());
        final List<String> lines = StringUtil.split(value, "\n");
        for (String line : lines) {
          writer.write(ADD_INFO_LINE_START);
          writer.write(line);
          writer.write(lineSeparator);
        }
      }
    }
  }
private static void writeAdditionalInfo(@NotNull Writer writer,
                                          @NotNull String lineSeparator,
                                          @Nullable Map<String, CharSequence> additionalMap)