@Test
public void testEquals() {

    String msg_A = "A Test Message";
    // clusterwide with msg_A
    ChiefControllerMessageEvent ccme_A_clusterwide = new ChiefControllerMessageEvent();
    ccme_A_clusterwide.setMsg(msg_A);
    ccme_A_clusterwide.setClusterWideMessage(true);
    // not clusterwiede with same msg_A
    ChiefControllerMessageEvent ccme_A = new ChiefControllerMessageEvent();
    ccme_A.setMsg(msg_A);
    ccme_A.setClusterWideMessage(false);
    // they are not equal!!
    assertFalse("same message, but one is clusterwide other not.", ccme_A.equals(ccme_A_clusterwide));
    // check null value
    assertFalse("never equal with <null>", ccme_A.equals(null));
    // same objects are equal
    assertTrue("same objectRefs, clusterwide", ccme_A_clusterwide.equals(ccme_A_clusterwide));
    assertTrue("same objectRefs", ccme_A.equals(ccme_A));
    /*
     * compare A with B, both with same message
     */
    String msg_B = "A Test Message";
    // clusterwide with msg_B
    ChiefControllerMessageEvent ccme_B_clusterwide = new ChiefControllerMessageEvent();
    ccme_B_clusterwide.setMsg(msg_B);
    ccme_B_clusterwide.setClusterWideMessage(true);
    // not clusterwiede with same msg_B
    ChiefControllerMessageEvent ccme_B = new ChiefControllerMessageEvent();
    ccme_B.setMsg(msg_B);
    ccme_B.setClusterWideMessage(false);
    // A and B's are equal
    assertTrue("same message, and both clusterwide", ccme_A_clusterwide.equals(ccme_B_clusterwide));
    assertTrue("same message", ccme_A.equals(ccme_B));
    /*
     * compate A with C, with different Messages
     */
    String msg_C = "another message";
    // clusterwide with msg_C
    ChiefControllerMessageEvent ccme_C_clusterwide = new ChiefControllerMessageEvent();
    ccme_C_clusterwide.setMsg(msg_C);
    ccme_C_clusterwide.setClusterWideMessage(true);
    // not clusterwiede with same msg_C
    ChiefControllerMessageEvent ccme_C = new ChiefControllerMessageEvent();
    ccme_C.setMsg(msg_C);
    ccme_C.setClusterWideMessage(false);
    assertFalse("not same message, but both clusterwide", ccme_C.equals(ccme_A));
    assertFalse("not same message", ccme_C.equals(ccme_A));
}