@Test
public void testEquals() {

    assertTrue(m_alarmInfo.equals(m_alarmInfo2));
    assertFalse(m_alarmInfoWithDifferentRaisedTime.equals(m_alarmInfo2));
    assertFalse(m_alarmInfo.equals(null));
    assertFalse(m_alarmInfo.equals("String literal"));
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO2, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity, null, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo2.equals(m_alarmInfo));
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, null, m_sourceObject, m_raisedTime, m_severity, TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo2.equals(m_alarmInfo));
    m_alarmInfo = new AlarmInfo(null, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID2, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, null, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity2,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", null, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject2, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertTrue(m_raisedTime == m_raisedTime);
    assertTrue(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, null);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID2);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    m_alarmInfo = new AlarmInfo(TEST_ALARM_TYPE_ID, "", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    m_alarmInfo2 = new AlarmInfo(TEST_ALARM_TYPE_ID, "some value", m_sourceObject, m_raisedTime, m_severity,
            TEST_ADDITIONAL_INFO, TEST_DEVICE_ID);
    assertFalse(m_alarmInfo.equals(m_alarmInfo2));
    assertFalse(m_alarmInfo.equals(m_alarmInfoWithSourceObjectString));
    m_alarmInfo.setSourceObject(null);
    m_alarmInfo.setSourceObjectString(RESOURCETYPE_STRING);
    assertTrue(m_alarmInfo.equals(m_alarmInfoWithSourceObjectString));
}