ButtonBuilder implements Serializable { @Override public String toString() { if (url == null) { throw new IllegalStateException("url is required, but missing"); } StringBuilder sb = new StringBuilder(); sb.append("<a"); sb.append(" class=\"FlattrButton"); if (styleClass != null) { sb.append(' ').append(escape(styleClass)); } sb.append('"'); if (style != null) { sb.append(" style=\"").append(escape(style)).append('"'); } sb.append(" href=\"").append(escape(url)).append('"'); if (title != null) { sb.append(" title=\"").append(escape(title)).append('"'); } if (language != null) { sb.append(" lang=\"").append(escape(language)).append('"'); } if (html5) { appendHtml5(sb); } else { appendAttributes(sb); } if (!attributes.isEmpty()) { for (Map.Entry<String, String> entry : attributes.entrySet()) { sb.append(' ').append(entry.getKey()).append("=\""); sb.append(escape(entry.getValue())); sb.append('"'); } } sb.append('>'); if (description != null) { sb.append(description); } sb.append("</a>"); return sb.toString(); }  ButtonBuilder url(String url); ButtonBuilder url(URL url); ButtonBuilder user(UserId user); ButtonBuilder title(String title); ButtonBuilder description(String description); ButtonBuilder descriptionTruncate(String description); ButtonBuilder category(CategoryId category); ButtonBuilder language(LanguageId language); ButtonBuilder tag(String tag); ButtonBuilder tags(Collection<String> tags); ButtonBuilder revsharekey(String key); ButtonBuilder button(ButtonType type); ButtonBuilder popout(boolean popout); ButtonBuilder hidden(); ButtonBuilder thing(Thing thing); ButtonBuilder thing(Submission thing); ButtonBuilder style(String style); ButtonBuilder styleClass(String styleClass); ButtonBuilder attribute(String attribute, String value); ButtonBuilder html5(); ButtonBuilder prefix(String prefix); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void testNoArgBuilder() { ButtonBuilder builder = new ButtonBuilder(); builder.toString(); }