@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ClusterStateChange<?> that = (ClusterStateChange<?>) o;

        if (!type.equals(that.type)) {
            return false;
        }
        return newState.equals(that.newState);

    }
@Test
    public void testEquals() {
        assertEquals(clusterStateChange, clusterStateChange);
        assertEquals(clusterStateChange, clusterStateChangeSameAttributes);

        assertNotEquals(null, clusterStateChange);
        assertNotEquals(new Object(), clusterStateChange);

        assertNotEquals(clusterStateChange, clusterStateChangeOtherType);
        assertNotEquals(clusterStateChange, clusterStateChangeOtherNewState);
    }