@Test
public void processMessageShouldSendOkResponseMessageContainingFirmwareVersions()
        throws OsgpException, JMSException {

    // arrange
    final FirmwareFileDto firmwareFileDto = this.setupFirmwareFileDto();
    final ResponseMessage responseMessage = this.setupResponseMessage(firmwareFileDto);
    final ObjectMessage message = new ObjectMessageBuilder().withMessageType(MessageType.GET_FIRMWARE_FILE.name())
                                                            .withObject(responseMessage).build();
    final UpdateFirmwareResponseDto updateFirmwareResponseDto = new UpdateFirmwareResponseDto(
            firmwareFileDto.getFirmwareIdentification(), new LinkedList<>());
    final ArgumentCaptor<ResponseMessage> responseMessageArgumentCaptor = ArgumentCaptor
            .forClass(ResponseMessage.class);
    when(this.domainHelperService.findDlmsDevice(any(MessageMetadata.class))).thenReturn(this.dlmsDevice);
    when(this.dlmsConnectionManagerMock.getDlmsMessageListener()).thenReturn(this.dlmsMessageListenerMock);
    when(this.connectionHelper
            .createConnectionForDevice(same(this.dlmsDevice), nullable(DlmsMessageListener.class)))
            .thenReturn(this.dlmsConnectionManagerMock);
    when(this.firmwareService.updateFirmware(this.dlmsConnectionManagerMock, this.dlmsDevice, firmwareFileDto))
            .thenReturn(updateFirmwareResponseDto);
    // act
    this.getFirmwareFileResponseMessageProcessor.processMessage(message);
    // assert
    verify(this.responseMessageSender, times(1)).send(responseMessageArgumentCaptor.capture());
    assertThat(responseMessageArgumentCaptor.getValue().getDataObject()).isSameAs(updateFirmwareResponseDto);
    assertThat(responseMessageArgumentCaptor.getValue().getResult()).isSameAs(ResponseMessageResultType.OK);
}