DynamicServiceAnnouncement { @Override public String toString() { return "ServiceAnnouncement{" + "id=" + id + ", type='" + type + '\'' + ", properties=" + properties + '}'; } @JsonCreator  DynamicServiceAnnouncement(
            @JsonProperty("id") Id<Service> id,
            @JsonProperty("type") String type,
            @JsonProperty("properties") Map<String, String> properties); @NotNull Id<Service> getId(); @NotNull String getType(); @NotNull Map<String, String> getProperties(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Function<DynamicServiceAnnouncement, Service> toServiceWith(final Id<Node> nodeId, final String location, final String pool);  }
@Test public void testParsing() throws IOException { JsonCodec<DynamicServiceAnnouncement> codec = JsonCodec.jsonCodec(DynamicServiceAnnouncement.class); DynamicServiceAnnouncement parsed = codec.fromJson(Resources.toString(Resources.getResource("dynamic-announcement.json"), Charsets.UTF_8)); DynamicServiceAnnouncement expected = new DynamicServiceAnnouncement(Id.<Service>valueOf("ff824508-b6a6-4dfc-8f0b-85028465534d"), "blue", ImmutableMap.of("key", "valueA")); assertEquals(parsed, expected); }
@Test public void testToString() { DynamicServiceAnnouncement announcement = new DynamicServiceAnnouncement(Id.<Service>valueOf("ff824508-b6a6-4dfc-8f0b-85028465534d"), "blue", ImmutableMap.of("key", "valueA")); assertNotNull(announcement.toString()); }