@Test
void checkSsldPendingFirmwareUpdateReturnsFalseIfPendingUpdatesAreForDifferentCorrelationUids() {

    final String organisationIdentification = "test-org";
    final String deviceIdentification = "device-identification";
    final String correlationUid = "correlation-uid-not-with-pending-updates";
    final CorrelationIds ids = new CorrelationIds(organisationIdentification, deviceIdentification, correlationUid);
    final List<FirmwareVersion> firmwareVersions = Arrays.asList(
            new FirmwareVersion(FirmwareModuleType.SECURITY, VERSION_2),
            new FirmwareVersion(FirmwareModuleType.FUNCTIONAL, VERSION_1));
    when(this.ssldPendingFirmwareUpdateRepository.findByDeviceIdentification(deviceIdentification))
            .thenReturn(Collections.singletonList(this.anSsldPendingFirmwareUpdate(4579L, new Date(),
                    deviceIdentification, "some-other-correlation-uid")));
    final boolean hasPendingFirmwareUpdate = this.firmwareManagementService.checkSsldPendingFirmwareUpdate(ids,
            firmwareVersions);
    assertThat(hasPendingFirmwareUpdate).isFalse();
    verify(this.ssldPendingFirmwareUpdateRepository).findByDeviceIdentification(deviceIdentification);
    verifyNoMoreInteractions(this.ssldPendingFirmwareUpdateRepository);
}