@Test
public void testMap() throws Exception {

    MorphlineResultToSolrMapper resultMapper = new MorphlineResultToSolrMapper();
    resultMapper.configure(ImmutableMap.of(
        MorphlineResultToSolrMapper.MORPHLINE_FILE_PARAM, "src/test/resources/test-morphlines/extractHBaseCells.conf")
        );
    Cell kvA = new KeyValue(ROW, COLUMN_FAMILY_A, QUALIFIER_A, Bytes.toBytes(42));
    Cell kvB = new KeyValue(ROW, COLUMN_FAMILY_B, QUALIFIER_B, "dummy value".getBytes("UTF-8"));
    Result result = Result.create(Lists.newArrayList(kvA, kvB));
    Multimap expectedMap = ImmutableMultimap.of("fieldA", 42, "fieldB", "dummy value");
    resultMapper.map(result, updateWriter);
    verify(updateWriter).add(solrInputDocCaptor.capture());
    
    SolrInputDocument solrDocument = solrInputDocCaptor.getValue();
    assertEquals(expectedMap, toRecord(solrDocument).getFields());
}