alarmApi.create(anAlarmRepresentationLike(ALARM_REPRESENTATION).withStatus("ACTIVE").withSource(source1).build());
alarmApi.create(anAlarmRepresentationLike(ALARM_REPRESENTATION).withStatus("ACKNOWLEDGED").withSource(source1).build());
alarmApi.create(anAlarmRepresentationLike(ALARM_REPRESENTATION).withStatus("ACKNOWLEDGED").withSource(source2).build());
// When
AlarmFilter acknowledgedFilter = new AlarmFilter().byStatus(CumulocityAlarmStatuses.ACKNOWLEDGED).bySource(source1);
AlarmCollectionRepresentation acknowledgedAlarms = (AlarmCollectionRepresentation) alarmApi.getAlarmsByFilter(acknowledgedFilter).get();
// Then
List alarms = acknowledgedAlarms.getAlarms();
assertThat(alarms.size()).isEqualTo(1);