Notification implements Comparable<Notification> { @JsonProperty public Optional<String> getId() { return id; } @JsonCreator private  Notification(
      @JsonProperty("category") final String category,
      @JsonProperty("message") final String message); private  Notification(final Builder builder); static Builder builder(final String category, final String message); static Builder builder(final String category); static Builder builder(); static Builder builder(final Notification other); static Notification create(final String id); @JsonProperty Optional<String> getId(); @JsonIgnore String getId(final String value); @JsonProperty String getCategory(); @JsonProperty String getMessage(); @JsonProperty ZonedDateTime getCreatedAt(); @JsonProperty Optional<Boolean> getUnseen(); @JsonProperty Map<String, String> getProperties(); @JsonProperty Collection<Notification> getNotifications(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); @Override int compareTo(final Notification that); static final int CATEGORY_MIN_LENGTH; static final int CATEGORY_MAX_LENGTH; static final int MESSAGE_MIN_LENGTH; static final int MESSAGE_MAX_LENGTH; }
@Test public void testGetId() throws Exception { final Notification n1 = Notification.builder().build(); assertThat(n1.getId("5")).isEqualTo("5"); final Notification n2 = Notification.create("1000"); assertThat(n2.getId("6")).isEqualTo("1000"); }