Email { @Override public String toString() { return new StringJoiner(", ", "Email [", "]") .add(String.format("address=%s", address)) .add(String.format("verified=%b", verified)) .add(String.format("verificationToken=%s", verificationToken)) .toString(); } @JsonCreator  Email(@JsonProperty("address") String address,
               @JsonProperty("verified") boolean verified,
               @JsonProperty("verificationToken") String verificationToken); String getAddress(); String getVerificationToken(); boolean isVerified(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test void toStringShouldBeCorrect() { String expected = new StringJoiner(", ", "Email [", "]") .add(String.format("address=%s", "test@test.com")) .add(String.format("verified=%b", "true")) .add(String.format("verificationToken=%s", "token")) .toString(); assertEquals(expected, email.toString()); }