class ContentTemplate {

  @VisibleForTesting
  static String getDiv(String key, String tag, String tagClose, boolean includeFieldName) {
    checkArgument(!Strings.isNullOrEmpty(key), "Key cannot be null/empty.");
    checkArgument(!Strings.isNullOrEmpty(tag), "Tag cannot be null/empty.");
    checkArgument(!Strings.isNullOrEmpty(tagClose), "Closing tag cannot be null/empty.");
    StringBuilder html = new StringBuilder();
    html.append("<div id='").append(HTML_ESCAPER.escape(key)).append("'>\n");
    if (includeFieldName) {
      html.append("  <p>").append(HTML_ESCAPER.escape(key)).append(":").append("</p>\n");
    }
    html.append("  ").append(tag).append("%s").append(tagClose).append("\n");
    html.append("</div>\n");
    return html.toString();
  }

  private  ContentTemplate(Builder builder);

}