@Test
public void updateFirmwareShouldCallExecutorWhenFirmwareFileInCache() throws OsgpException {

    // Arrange
    final String firmwareIdentification = "fw";
    final byte[] firmwareFile = firmwareIdentification.getBytes();
    when(this.firmwareFileCachingRepository.isAvailable(firmwareIdentification)).thenReturn(true);
    when(this.firmwareFileCachingRepository.retrieve(firmwareIdentification)).thenReturn(firmwareFile);
    // Act
    this.firmwareService.updateFirmware(this.dlmsConnectionManagerMock, this.dlmsDeviceMock,
            firmwareIdentification);
    // Assert
    verify(this.updateFirmwareCommandExecutor, times(1)).execute(this.dlmsConnectionManagerMock,
            this.dlmsDeviceMock, firmwareIdentification);
}