@Test public void updateFirmwareShouldNotCallExecutorWhenFirmwareFileNotInCache() throws OsgpException { final String firmwareIdentification = "fw"; when(this.firmwareFileCachingRepository.retrieve(firmwareIdentification)).thenReturn(null); try { this.firmwareService.updateFirmware(this.dlmsConnectionManagerMock, this.dlmsDeviceMock, firmwareIdentification); } catch (final ProtocolAdapterException e) { } verify(this.updateFirmwareCommandExecutor, never()).execute(this.dlmsConnectionManagerMock, this.dlmsDeviceMock, firmwareIdentification); }
public UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device, final String firmwareIdentification) throws OsgpException { LOGGER.info("Updating firmware of device {} to firmware with identification {}", device, firmwareIdentification); return this.executeFirmwareUpdate(conn, device, firmwareIdentification); }
FirmwareService { public UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device, final String firmwareIdentification) throws OsgpException { LOGGER.info("Updating firmware of device {} to firmware with identification {}", device, firmwareIdentification); return this.executeFirmwareUpdate(conn, device, firmwareIdentification); } }
FirmwareService { public UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device, final String firmwareIdentification) throws OsgpException { LOGGER.info("Updating firmware of device {} to firmware with identification {}", device, firmwareIdentification); return this.executeFirmwareUpdate(conn, device, firmwareIdentification); }  }
FirmwareService { public UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device, final String firmwareIdentification) throws OsgpException { LOGGER.info("Updating firmware of device {} to firmware with identification {}", device, firmwareIdentification); return this.executeFirmwareUpdate(conn, device, firmwareIdentification); }  List<FirmwareVersionDto> getFirmwareVersions(final DlmsConnectionManager conn, final DlmsDevice device); UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device,
            final String firmwareIdentification); UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device,
            final FirmwareFileDto firmwareFileDto); boolean isFirmwareFileAvailable(final String firmwareIdentification); }
FirmwareService { public UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device, final String firmwareIdentification) throws OsgpException { LOGGER.info("Updating firmware of device {} to firmware with identification {}", device, firmwareIdentification); return this.executeFirmwareUpdate(conn, device, firmwareIdentification); }  List<FirmwareVersionDto> getFirmwareVersions(final DlmsConnectionManager conn, final DlmsDevice device); UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device,
            final String firmwareIdentification); UpdateFirmwareResponseDto updateFirmware(final DlmsConnectionManager conn, final DlmsDevice device,
            final FirmwareFileDto firmwareFileDto); boolean isFirmwareFileAvailable(final String firmwareIdentification);  }