@Test public void subclassesEqual() { class OtherClass extends EncryptedTransaction {} final OtherClass other = new OtherClass(); final EncryptedTransaction et = new EncryptedTransaction(); final boolean equal = Objects.equals(et, other); assertThat(equal).isTrue(); }
@Override public boolean equals(final Object obj) { return (obj instanceof EncryptedTransaction) && Objects.equals(this.hash, ((EncryptedTransaction) obj).hash); }
EncryptedTransaction implements Serializable { @Override public boolean equals(final Object obj) { return (obj instanceof EncryptedTransaction) && Objects.equals(this.hash, ((EncryptedTransaction) obj).hash); } }
EncryptedTransaction implements Serializable { @Override public boolean equals(final Object obj) { return (obj instanceof EncryptedTransaction) && Objects.equals(this.hash, ((EncryptedTransaction) obj).hash); } EncryptedTransaction(final MessageHash hash, final byte[] encodedPayload);  EncryptedTransaction(); }
EncryptedTransaction implements Serializable { @Override public boolean equals(final Object obj) { return (obj instanceof EncryptedTransaction) && Objects.equals(this.hash, ((EncryptedTransaction) obj).hash); } EncryptedTransaction(final MessageHash hash, final byte[] encodedPayload);  EncryptedTransaction(); @PrePersist void onPersist(); MessageHash getHash(); void setHash(final MessageHash hash); byte[] getEncodedPayload(); void setEncodedPayload(final byte[] encodedPayload); long getTimestamp(); @Override int hashCode(); @Override boolean equals(final Object obj); }
EncryptedTransaction implements Serializable { @Override public boolean equals(final Object obj) { return (obj instanceof EncryptedTransaction) && Objects.equals(this.hash, ((EncryptedTransaction) obj).hash); } EncryptedTransaction(final MessageHash hash, final byte[] encodedPayload);  EncryptedTransaction(); @PrePersist void onPersist(); MessageHash getHash(); void setHash(final MessageHash hash); byte[] getEncodedPayload(); void setEncodedPayload(final byte[] encodedPayload); long getTimestamp(); @Override int hashCode(); @Override boolean equals(final Object obj);  }