@Test
public void testConvertToAlarmEntity() {

    Timestamp raisedTime = new Timestamp(System.currentTimeMillis());
    AlarmInfo info = new AlarmInfo(QName.create("namespace", "hello").toString(), MODEL_NODE_ID, raisedTime, AlarmSeverity.MAJOR, DB_ID, null);
    Alarm alarm = AlarmUtil.convertToAlarmEntity(info, DB_ID);
    assertEquals(info.getTime(), alarm.getRaisedTime());
    assertEquals(info.getAlarmText(), alarm.getAlarmText());
    assertEquals(info.getSeverity(), alarm.getSeverity());
    assertEquals(DB_ID, alarm.getSourceObject());
}