DocumentFieldsTranslator { public void translate( DocumentBuilder documentBuilder, Map<String, Object> documentSourceMap) { if (MapUtil.isEmpty(documentSourceMap)) { return; } documentSourceMap.forEach( (name, value) -> translate(name, value, documentBuilder)); } DocumentFieldsTranslator(GeoBuilders geoBuilders); void populateAlternateUID(
		Map<String, DocumentField> documentFieldsMap,
		DocumentBuilder documentBuilder, String alternateUidFieldName); void translate(
		DocumentBuilder documentBuilder,
		Map<String, Object> documentSourceMap); void translate(
		Map<String, DocumentField> documentFieldsMap,
		DocumentBuilder documentBuilder);  }
@Test public void testDocumentSourceMapWithMultiValueField() { DocumentFieldsTranslator documentFieldsTranslator = new DocumentFieldsTranslator(null); DocumentBuilder documentBuilder = new DocumentBuilderImpl(); String fieldName = RandomTestUtil.randomString(); List<String> list1 = Arrays.asList( RandomTestUtil.randomString(), RandomTestUtil.randomString()); documentFieldsTranslator.translate( documentBuilder, Collections.singletonMap(fieldName, list1)); Document document = documentBuilder.build(); List<String> list2 = document.getStrings(fieldName); Assert.assertEquals(list1.toString(), list2.toString()); }