@Test
public void testConvertToAlarmTypes() {

    final long registerValue = Long.parseLong("00000001000100010001000100000001", 2);
    final Set<AlarmTypeDto> alarmTypes = this.alarmHelperService.toAlarmTypes(registerValue);
    assertThat(alarmTypes.contains(AlarmTypeDto.CLOCK_INVALID)).isTrue();
    assertThat(alarmTypes.contains(AlarmTypeDto.PROGRAM_MEMORY_ERROR)).isTrue();
    assertThat(alarmTypes.contains(AlarmTypeDto.WATCHDOG_ERROR)).isTrue();
    assertThat(alarmTypes.contains(AlarmTypeDto.COMMUNICATION_ERROR_M_BUS_CHANNEL_1)).isTrue();
    assertThat(alarmTypes.contains(AlarmTypeDto.FRAUD_ATTEMPT_M_BUS_CHANNEL_1)).isTrue();
    assertThat(alarmTypes.contains(AlarmTypeDto.NEW_M_BUS_DEVICE_DISCOVERED_CHANNEL_1)).isTrue();
}