@Override
    public boolean equals(Object o) {
        if (!(o instanceof ClusterMessage)) {
            return false;
        }

        ClusterMessage that = (ClusterMessage) o;

        return Objects.equals(this.sender, that.sender) &&
                Objects.equals(this.subject, that.subject) &&
                Arrays.equals(this.payload, that.payload);
    }
@Test
    public void testEquals() {
        new EqualsTester()
                .addEqualityGroup(message1, sameAsMessage1)
                .addEqualityGroup(message2)
                .addEqualityGroup(message3)
                .testEquals();
    }