### Question:
DefaultResultToSolrMapper implements ResultToSolrMapper { @Override public void map(Result result, SolrUpdateWriter solrUpdateWriter) { TimerContext timerContext = mappingTimer.time(); try { SolrInputDocument solrInputDocument = new SolrInputDocument(); for (SolrDocumentExtractor documentExtractor : resultDocumentExtractors) { documentExtractor.extractDocument(result, solrInputDocument); } solrUpdateWriter.add(solrInputDocument); } finally { timerContext.stop(); } } DefaultResultToSolrMapper(String indexerName, List<FieldDefinition> fieldDefinitions,
            List<DocumentExtractDefinition> documentExtractDefinitions); @Override boolean containsRequiredData(Result result); @Override boolean isRelevantKV(KeyValue kv); @Override Get getGet(byte[] row); @Override void map(Result result, SolrUpdateWriter solrUpdateWriter);  }### Answer:
@Test public void testMap() { FieldDefinition fieldDefA = new FieldDefinition("fieldA", "cfA:qualifierA", ValueSource.VALUE, "int"); FieldDefinition fieldDefB = new FieldDefinition("fieldB", "cfB:qualifierB", ValueSource.VALUE, DummyValueMapper.class.getName()); DefaultResultToSolrMapper resultMapper = new DefaultResultToSolrMapper("index-name", Lists.newArrayList(fieldDefA, fieldDefB), Collections.<DocumentExtractDefinition> emptyList()); KeyValue kvA = new KeyValue(ROW, COLUMN_FAMILY_A, QUALIFIER_A, Bytes.toBytes(42)); KeyValue kvB = new KeyValue(ROW, COLUMN_FAMILY_B, QUALIFIER_B, Bytes.toBytes("dummy value")); Result result = Result.create(Lists.<Cell>newArrayList(kvA, kvB)); resultMapper.map(result, solrUpdateWriter); verify(solrUpdateWriter).add(solrInputDocCaptor.capture()); SolrInputDocument solrDocument = solrInputDocCaptor.getValue(); assertEquals(Sets.newHashSet("fieldA", "fieldB"), solrDocument.keySet()); SolrInputField fieldA = solrDocument.get("fieldA"); SolrInputField fieldB = solrDocument.get("fieldB"); assertEquals(Lists.newArrayList(42), fieldA.getValues()); assertEquals(Lists.newArrayList("A", "B", "C"), fieldB.getValues()); }