}
@Test
public void shouldUpdateAlarm() throws Exception {
// Given
AlarmRepresentation created = alarmApi.create(anAlarmRepresentationLike(ALARM_REPRESENTATION)
.withStatus("ACTIVE")
.withSource(mo1).build());
// When
AlarmRepresentation alarm = new AlarmRepresentation();
alarm.setStatus("ACKNOWLEDGED");
alarm.setId(created.getId());
alarmApi.updateAlarm(alarm);
// Then
AlarmRepresentation returned = alarmApi.getAlarm(created.getId());
assertThat(returned.getStatus(), is("ACKNOWLEDGED"));
assertThat(returned.getSource().getId(), is(mo1.getId()));
}