### Question:
ElasticsearchFieldResolver implements FieldResolver { @Override public Object getFieldValue(Field field, Object originalValue) throws RuntimeException { Types.MinorType fieldType = Types.getMinorTypeForArrowType(field.getType()); String fieldName = field.getName(); Object fieldValue; if (originalValue instanceof Map) { if (((Map) originalValue).containsKey(fieldName)) { fieldValue = ((Map) originalValue).get(fieldName); } else { return null; } } else { throw new IllegalArgumentException("Invalid argument type. Expecting a Map, but got: " + originalValue.getClass().getTypeName()); } switch (fieldType) { case LIST: return coerceListField(field, fieldValue); case STRUCT: if (fieldValue instanceof Map) { return fieldValue; } break; default: if (!(fieldValue instanceof Map)) { return coerceField(field, fieldValue); } break; } throw new RuntimeException("Invalid field value encountered in Document for field: " + field + ",value: " + fieldValue); } protected  ElasticsearchFieldResolver(); @Override Object getFieldValue(Field field, Object originalValue);  }### Answer:
@Test public void getFieldValueTest() { logger.info("getFieldValueTest - enter"); Map<String, Object> extractedResults = new HashMap<>(); for (Field field: mapping.getFields()) { extractedResults.put(field.getName(), resolver.getFieldValue(field, document)); logger.info("Extracted: {}", extractedResults.get(field.getName())); } assertEquals("Extracted values mismatch!", expectedResults, extractedResults); logger.info("getFieldValueTest - exit"); }