@Test void canFindEquality() { final String id = UUID.randomUUID().toString(); final BaseSearchResult searchResult1 = new BaseSearchResult(id, UUID.randomUUID().toString(), UUID.randomUUID().toString()); final BaseSearchResult searchResult2 = new BaseSearchResult(id, UUID.randomUUID().toString(), UUID.randomUUID().toString()); final BaseSearchResult searchResult3 = new BaseSearchResult( UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString() ); Assertions.assertThat(searchResult1).isEqualTo(searchResult2); Assertions.assertThat(searchResult1).isNotEqualTo(searchResult3); Assertions.assertThat(searchResult1.hashCode()).isEqualTo(searchResult2.hashCode()); Assertions.assertThat(searchResult1.hashCode()).isNotEqualTo(searchResult3.hashCode()); }
@Override public String toString() { try { return GenieObjectMapper.getMapper().writeValueAsString(this); } catch (final JsonProcessingException ioe) { return ioe.getLocalizedMessage(); } }
BaseSearchResult implements Serializable { @Override public String toString() { try { return GenieObjectMapper.getMapper().writeValueAsString(this); } catch (final JsonProcessingException ioe) { return ioe.getLocalizedMessage(); } } }
BaseSearchResult implements Serializable { @Override public String toString() { try { return GenieObjectMapper.getMapper().writeValueAsString(this); } catch (final JsonProcessingException ioe) { return ioe.getLocalizedMessage(); } } @JsonCreator  BaseSearchResult(
        @NotBlank @JsonProperty(value = "id", required = true) final String id,
        @NotBlank @JsonProperty(value = "name", required = true) final String name,
        @NotBlank @JsonProperty(value = "user", required = true) final String user
    ); }
BaseSearchResult implements Serializable { @Override public String toString() { try { return GenieObjectMapper.getMapper().writeValueAsString(this); } catch (final JsonProcessingException ioe) { return ioe.getLocalizedMessage(); } } @JsonCreator  BaseSearchResult(
        @NotBlank @JsonProperty(value = "id", required = true) final String id,
        @NotBlank @JsonProperty(value = "name", required = true) final String name,
        @NotBlank @JsonProperty(value = "user", required = true) final String user
    ); @Override String toString(); }
BaseSearchResult implements Serializable { @Override public String toString() { try { return GenieObjectMapper.getMapper().writeValueAsString(this); } catch (final JsonProcessingException ioe) { return ioe.getLocalizedMessage(); } } @JsonCreator  BaseSearchResult(
        @NotBlank @JsonProperty(value = "id", required = true) final String id,
        @NotBlank @JsonProperty(value = "name", required = true) final String name,
        @NotBlank @JsonProperty(value = "user", required = true) final String user
    ); @Override String toString();  }