### Question:
PostmanService { void mapExecutionsToScenarios(List<Execution> executions, List<NewmanScenario> newmanScenarios) { for (Execution execution : executions) { final String itemId = execution.getItem().getId(); Optional<NewmanScenario> newmanScenario = findByItemId(newmanScenarios, itemId); if (newmanScenario.isPresent()) { newmanScenario.get().setExecution(execution); } else { log.error("Execution {} has no matching item in the Postman collection", itemId); } } }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }### Answer:
@Test public void mapExecutionsToScenarios_should_match_executions_to_scenarios_if_any() { final Execution execution2 = new Execution().withItem(new ItemId().withId("id2")); final Execution execution3 = new Execution().withItem(new ItemId().withId("id3")); List<Execution> executions = Arrays.asList(execution2, execution3); final NewmanScenario newmanScenario1 = new NewmanScenario().withItem(new Item().withId("id1")); final NewmanScenario newmanScenario2 = new NewmanScenario().withItem(new Item().withId("id2")); List<NewmanScenario> newmanScenarios = Arrays.asList(newmanScenario1, newmanScenario2); cut.mapExecutionsToScenarios(executions, newmanScenarios); assertThat(newmanScenario1.getExecution()).isNull(); assertThat(newmanScenario2.getExecution()).isSameAs(execution2); }