### Question:
SolrHighlightFragmentsMerger { public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); }  String merge(Map<String, List<String>> highlightedData, F field);  }### Answer:
@Test public void merge() { Map<String, List<String>> highlightFragments = StringListMap.of(new String[][] { { "content", "some text some text", "other text content", "yet another text" }, }); String actualMerged = highlightFragmentsMerger.merge(highlightFragments, JudgmentIndexField.CONTENT); assertEquals("some text some text ... other text content ... yet another text", actualMerged); }
@Test public void merge_EMPTY() { Map<String, List<String>> highlightFragments = Maps.newHashMap(); String actualMerged = highlightFragmentsMerger.merge(highlightFragments, JudgmentIndexField.CONTENT); assertEquals(StringUtils.EMPTY, actualMerged); }