### Question:
ElasticsearchTypeUtils { private Extractor makeFloat8Extractor(Field field) { return (Float8Extractor) (Object context, NullableFloat8Holder dst) -> { Object fieldValue = ((Map) context).get(field.getName()); dst.isSet = 1; if (fieldValue instanceof Number) { dst.value = ((Number) fieldValue).doubleValue(); } else if (fieldValue instanceof String) { dst.value = new Double((String) fieldValue); } else if (fieldValue instanceof List) { Object value = ((List) fieldValue).get(0); if (value instanceof Number) { dst.value = ((Number) value).doubleValue(); } else if (value instanceof String) { dst.value = new Double((String) value); } else { dst.isSet = 0; } } else { dst.isSet = 0; } }; } protected  ElasticsearchTypeUtils();   }### Answer:
@Test public void makeFloat8ExtractorTest() throws Exception { logger.info("makeFloat8ExtractorTest - enter"); mapping = SchemaBuilder.newBuilder() .addField("mydouble", Types.MinorType.FLOAT8.getType()) .addField("mydoublestring", Types.MinorType.FLOAT8.getType()) .addField("mydoublelist", Types.MinorType.FLOAT8.getType()) .addField("mydoublestringlist", Types.MinorType.FLOAT8.getType()) .build(); Map <String, Object> document = new ObjectMapper().readValue( "{\n" + " \"mydouble\" : 529388745.45784,\n" + " \"mydoublestring\" : \"923643764.2325\",\n" + " \"mydoublelist\" : [\n" + " 65,\n" + " 2\n" + " ],\n" + " \"mydoublestringlist\" : [\n" + " \"10\",\n" + " \"4\"\n" + " ]\n" + "}\n", HashMap.class); Map<String, Object> expectedResults = ImmutableMap.of( "mydouble", new Double(529388745.45784), "mydoublestring", new Double(923643764.2325), "mydoublelist", new Double(65.0), "mydoublestringlist", new Double(10.0)); Map<String, Object> extractedResults = testField(mapping, document); logger.info("makeFloat8ExtractorTest - Expected: {}, Extracted: {}", expectedResults, extractedResults); assertEquals("Extracted results are not as expected!", expectedResults, extractedResults); logger.info("makeFloat8ExtractorTest - exit"); }