StaticButtonBuilder implements Serializable { public StaticButtonBuilder thing(String url) { this.url = url; return this; }  StaticButtonBuilder thing(String url); StaticButtonBuilder thing(AutoSubmission submission); StaticButtonBuilder thing(Thing thing); StaticButtonBuilder badge(BadgeType type); StaticButtonBuilder badgeUrl(String url); StaticButtonBuilder badgeUrl(URL url); StaticButtonBuilder style(String style); StaticButtonBuilder styleClass(String styleClass); StaticButtonBuilder attribute(String attribute, String value); @Override String toString();  }
@Test public void testMinimalBuilder() { StaticButtonBuilder builder = new StaticButtonBuilder(); builder.thing("https: assertThat(builder, hasToString( "<a href=\"https: + "<img src=\"http: + " width=\"93\" height=\"20\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" />" + "</a>")); }
@Test public void testAutoSubmissionBuilder() { AutoSubmission submission = new AutoSubmission(); submission.setUrl("http: submission.setUser(User.withId("shred")); submission.addTag("Site"); StaticButtonBuilder builder = new StaticButtonBuilder(); builder.thing(submission); assertThat(builder, hasToString( "<a href=\"https: "url=http%3A%2F%2Fwww.shredzone.org&amp;tags=Site\">" + "<img src=\"http: " width=\"93\" height=\"20\"" + " alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>")); }