### Question:
HBaseSolrDocumentExtractor implements SolrDocumentExtractor { @Override public void extractDocument(Result result, SolrInputDocument solrInputDocument) { List<Object> values = Lists.newArrayList(); for (byte[] bytes : valueExtractor.extract(result)) { values.addAll(valueMapper.map(bytes)); } solrInputDocument.addField(fieldName, values); } HBaseSolrDocumentExtractor(String fieldName, ByteArrayExtractor valueExtractor,
            ByteArrayValueMapper valueMapper); @Override void extractDocument(Result result, SolrInputDocument solrInputDocument);  }### Answer:
@Test public void testExtractDocument() { byte[] bytesA = new byte[] { 1, 2 }; byte[] bytesB = new byte[] { 3, 4 }; Result result = mock(Result.class); when(valueExtractor.extract(result)).thenReturn(Lists.newArrayList(bytesA, bytesB)); doReturn(Lists.newArrayList("A")).when(valueMapper).map(bytesA); doReturn(Lists.newArrayList("B")).when(valueMapper).map(bytesB); SolrInputDocument solrDocument = new SolrInputDocument(); documentExtractor.extractDocument(result, solrDocument); assertEquals(Sets.newHashSet("fieldName"), solrDocument.keySet()); assertEquals(Lists.newArrayList("A", "B"), solrDocument.get("fieldName").getValues()); }