Source:
public void handleUpdateFirmwareResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final UpdateFirmwareResponseDto updateFirmwareResponseDto) throws FunctionalException { LOGGER.info("handleUpdateFirmwareResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error("Update firmware response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } final List<FirmwareVersion> firmwareVersions = this.configurationMapper .mapAsList(updateFirmwareResponseDto.getFirmwareVersions(), FirmwareVersion.class); final SmartMeter smartMeter = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); this.firmwareService.storeFirmware(smartMeter, updateFirmwareResponseDto.getFirmwareIdentification(), firmwareVersions, deviceMessageMetadata.getOrganisationIdentification()); final UpdateFirmwareResponse updateFirmwareResponse = new UpdateFirmwareResponse(firmwareVersions); this.webServiceResponseMessageSender.send( ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(updateFirmwareResponse) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }

Target:
public void handleUpdateFirmwareResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final UpdateFirmwareResponseDto updateFirmwareResponseDto) throws FunctionalException { LOGGER.info("handleUpdateFirmwareResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error("Update firmware response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } final List<FirmwareVersion> firmwareVersions = this.configurationMapper .mapAsList(updateFirmwareResponseDto.getFirmwareVersions(), FirmwareVersion.class); final SmartMeter smartMeter = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); this.firmwareService.storeFirmware(smartMeter, updateFirmwareResponseDto.getFirmwareIdentification(), firmwareVersions, deviceMessageMetadata.getOrganisationIdentification()); final UpdateFirmwareResponse updateFirmwareResponse = new UpdateFirmwareResponse(firmwareVersions); ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(updateFirmwareResponse) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send( responseMessage, deviceMessageMetadata.getMessageType()); }