### Question:
MorphlineResultToSolrMapper implements ResultToSolrMapper, Configurable { @Override public Get getGet(byte[] row) { return localMorphlineMapper.get().getGet(row); } MorphlineResultToSolrMapper(); @Override void configure(Map<String, String> config); @Override boolean containsRequiredData(Result result); @Override boolean isRelevantKV(KeyValue kv); @Override Get getGet(byte[] row); @Override void map(Result result, SolrUpdateWriter solrUpdateWriter); static final String MORPHLINE_FILE_PARAM; static final String MORPHLINE_ID_PARAM; static final String MORPHLINE_VARIABLE_PARAM; static final String MORPHLINE_FIELD_PARAM; static final String OUTPUT_MIME_TYPE; }### Answer:
@Test public void testGetGet_SingleCellFieldDefinition() { FieldDefinition fieldDef = new FieldDefinition("fieldname", "cf:qualifier", ValueSource.VALUE, "int"); MorphlineResultToSolrMapper resultMapper = createMorphlineMapper(fieldDef); Get get = resultMapper.getGet(ROW); assertArrayEquals(ROW, get.getRow()); assertEquals(1, get.getFamilyMap().size()); assertTrue(get.getFamilyMap().containsKey(Bytes.toBytes("cf"))); NavigableSet<byte[]> qualifiers = get.getFamilyMap().get(Bytes.toBytes("cf")); assertEquals(1, qualifiers.size()); assertTrue(qualifiers.contains(Bytes.toBytes("qualifier"))); }
@Test public void testGetGet_WildcardFieldDefinition() { FieldDefinition fieldDef = new FieldDefinition("fieldname", "cf:qual*", ValueSource.VALUE, "int"); MorphlineResultToSolrMapper resultMapper = createMorphlineMapper(fieldDef); Get get = resultMapper.getGet(ROW); assertArrayEquals(ROW, get.getRow()); assertEquals(1, get.getFamilyMap().size()); assertTrue(get.getFamilyMap().containsKey(Bytes.toBytes("cf"))); NavigableSet<byte[]> qualifiers = get.getFamilyMap().get(Bytes.toBytes("cf")); assertNull(qualifiers); }