@Test
public void testGetAlarms() {

    m_persistenceManager.getEntityDataStoreManager().beginTransaction();
    List<Alarm> alarms = getAlarmsFor(0, 0);
    m_persistenceManager.getEntityDataStoreManager().commitTransaction();
    assertEquals(0, alarms.size());
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    createAlarms(timestamp, 1);
    m_persistenceManager.getEntityDataStoreManager().beginTransaction();
    // now validate different cases
    alarms = getAlarmsFor(0, 1);
    assertEquals(1, alarms.size());
    assertEquals(timestamp, alarms.get(0).getRaisedTime());
    alarms = getAlarmsFor(0, 100);
    assertEquals(1, alarms.size());
    assertEquals(timestamp, alarms.get(0).getRaisedTime());
    alarms = getAlarmsFor(1, 100);
    assertEquals(0, alarms.size());
    alarms = getAlarmsFor(1, 1);
    assertEquals(0, alarms.size());
    alarms = getAlarmsFor(0, 1);
    assertEquals(1, alarms.size());
    assertEquals(timestamp, alarms.get(0).getRaisedTime());
    m_persistenceManager.getEntityDataStoreManager().commitTransaction();
    destroyAlarms();
}