AlarmMapper { public Alarm mapUpdateAlarmFormToSeyren(final Alarm updatedAlarm) throws CerebroException { alarmValidator.validateAlarm(updatedAlarm); updateSourcesToBackend(updatedAlarm); updatedAlarm.getSubscriptions().forEach(subscription -> subscriptionMapper.mapUpdateSubscriptionFormToSeyren(subscription)); return updatedAlarm; }  Alarm.Alarms mapToPresentation(Alarm.Alarms alarms); Collection<Alarm> mapToPresentation(final Collection<Alarm> alarms); Alarm mapToPresentation(Alarm alarm); Alarm mapNewAlarmFormToSeyren(Alarm newAlarm); Alarm mapUpdateAlarmFormToSeyren(final Alarm updatedAlarm); static final String DEFAULT_FROM; static final String DEFAULT_UNTIL; }
@Test public void testMapUpdateAlarmFormToSeyrenOK() throws Exception { alarmMapper.mapUpdateAlarmFormToSeyren(this.defaultAlarm); verify(alarmValidator).validateAlarm(this.defaultAlarm); this.defaultAlarm.getSubscriptions() .forEach(subscription -> verify(subscriptionMapper).mapUpdateSubscriptionFormToSeyren(subscription)); }