### Question:
DefaultResultToSolrMapper implements ResultToSolrMapper { @Override public boolean containsRequiredData(Result result) { for (ByteArrayExtractor extractor : extractors) { if (!extractor.containsTarget(result)) { return false; } } return true; } 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 testContainsRequiredData_True() { DefaultResultToSolrMapper resultToSolrMapper = new DefaultResultToSolrMapper("index-name", Lists.newArrayList(new FieldDefinition("fieldname", "cfA:qualifierA", ValueSource.VALUE, "int")), Collections.<DocumentExtractDefinition>emptyList()); Result result = Result.create(Lists.<Cell>newArrayList(new KeyValue(ROW, COLUMN_FAMILY_A, QUALIFIER_A, Bytes.toBytes("value")))); assertTrue(resultToSolrMapper.containsRequiredData(result)); }
@Test public void testContainsRequiredData_False() { DefaultResultToSolrMapper resultToSolrMapper = new DefaultResultToSolrMapper("index-name", Lists.newArrayList(new FieldDefinition("fieldname", "cfA:quali*", ValueSource.VALUE, "int")), Collections.<DocumentExtractDefinition>emptyList()); Result result = Result.create(Lists.<Cell>newArrayList(new KeyValue(ROW, COLUMN_FAMILY_A, QUALIFIER_A, Bytes.toBytes("value")))); assertFalse(resultToSolrMapper.containsRequiredData(result)); }