@Test
void shouldReduceHistoryResults() {

    String historyId1 = UUID.randomUUID().toString();
    String historyId2 = UUID.randomUUID().toString();
    final Map<String, Object> extra1 = new HashMap<>();
    final Map<String, Object> extra2 = new HashMap<>();
    final Map<String, HistoryData> historyDataMap = new HashMap<>();
    historyDataMap.put(historyId1, new HistoryData().setItems(singletonList(createHistoryItem(PASSED, 1, 2))));
    historyDataMap.put(historyId2, new HistoryData().setItems(singletonList(createHistoryItem(PASSED, 2, 3))));
    extra1.put(HISTORY_BLOCK_NAME, historyDataMap);
    extra2.put(HISTORY_BLOCK_NAME, copyHistoryData(historyDataMap));
    Map<String, HistoryData> data = new HistoryPlugin().getData(asList(
            createLaunchResults(extra1, createTestResult(PASSED, historyId1, 3, 4)),
            createLaunchResults(extra2, createTestResult(PASSED, historyId2, 5, 6))
    ));
    assertThat(data).containsKeys(historyId1, historyId2);
    assertThat(data.get(historyId1).getItems()).hasSize(2);
    assertThat(data.get(historyId2).getItems()).hasSize(2);
}