@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());
}