@Test
public void addMeterProtocolInfoNotFound() {

    // SETUP
    when(this.smartMeteringDeviceRepository.findByDeviceIdentification(DEVICE_IDENTIFICATION)).thenReturn(null);
    when(this.smartMeteringDevice.getProtocolName()).thenReturn(PROTOCOL_NAME);
    when(this.smartMeteringDevice.getProtocolVersion()).thenReturn(PROTOCOL_VERSION);
    when(this.protocolInfoRepository.findByProtocolAndProtocolVersion(PROTOCOL_NAME, PROTOCOL_VERSION))
            .thenReturn(null);
    // CALL
    try {
        this.instance.addMeter(this.deviceMessageMetadata, this.addSmartMeterRequest);
    } catch (final FunctionalException e) {
        assertThat(e.getExceptionType()).isEqualTo(FunctionalExceptionType.UNKNOWN_PROTOCOL_NAME_OR_VERSION);
        assertThat(e.getComponentType()).isEqualTo(ComponentType.DOMAIN_SMART_METERING);
    }
}