@Test
public void updateFirmwareShouldNotCallExecutorWhenFirmwareFileNotInCache() throws OsgpException {

    // Arrange
    final String firmwareIdentification = "fw";
    when(this.firmwareFileCachingRepository.retrieve(firmwareIdentification)).thenReturn(null);
    // Act
    try {
        this.firmwareService.updateFirmware(this.dlmsConnectionManagerMock, this.dlmsDeviceMock,
                firmwareIdentification);
    } catch (final ProtocolAdapterException e) {
        // Ignore exception.
    }
    // Assert
    verify(this.updateFirmwareCommandExecutor, never()).execute(this.dlmsConnectionManagerMock, this.dlmsDeviceMock,
            firmwareIdentification);
}