ServiceAnnouncement { @Override public String toString() { return toStringHelper(this) .add("id", id) .add("type", type) .add("properties", properties) .add("error", error) .toString(); } private  ServiceAnnouncement(String type, Map<String, String> properties); private  ServiceAnnouncement(String error); @JsonProperty UUID getId(); @JsonProperty String getType(); @Nullable String getError(); @JsonProperty Map<String, String> getProperties(); @Override String toString(); ServiceDescriptor toServiceDescriptor(NodeInfo nodeInfo); static ServiceAnnouncementBuilder serviceAnnouncement(String type); static ServiceAnnouncement serviceAnnouncementError(String error);  }
@Test public void testToString() { assertNotNull(serviceAnnouncement("foo").build()); }