  @Test
  public void shouldGetRecord() throws ExecutionException, InterruptedException {


    // given
    ProcessingResult result1 = new ProcessingResult();
    ProcessingResult result2 = new ProcessingResult();

    when(dataProcessingJob.process(eq(SRN_1), eq(AUTH), eq(PARTITION)))
        .thenReturn(processingResultCompletableFutureOne);
    when(dataProcessingJob.process(eq(SRN_2), eq(AUTH), eq(PARTITION)))
        .thenReturn(processingResultCompletableFutureTwo);
    when(processingResultCompletableFutureOne.get()).thenReturn(result1);
    when(processingResultCompletableFutureTwo.get()).thenReturn(result2);

    DeliveryResponse deliveryResponse = new DeliveryResponse();
    when(resultDataConverter.convertProcessingResults(eq(Arrays.asList(result1, result2))))
        .thenReturn(deliveryResponse);

    InputPayload inputPayload = new InputPayload(Arrays.asList(SRN_1, SRN_2), REGION_ID);

    Map<String, Object> map = new HashMap<>();
    map.put(OsduHeader.AUTHORIZATION, AUTH);
    map.put(OsduHeader.PARTITION, PARTITION);
    MessageHeaders headers = new MessageHeaders(map);

    // when
    DeliveryResponse response = delfiDeliveryService.getResources(inputPayload, headers);

    // then
    assertEquals(response, deliveryResponse);
  }