test/framework/src/main/java/org/elasticsearch/index/mapper/MapperTestCase.java
* be loaded from doc values.
         */
        List<SyntheticSourceInvalidExample> invalidExample() throws IOException;
    }
    protected abstract SyntheticSourceSupport syntheticSourceSupport(boolean ignoreMalformed);
    public final void testSyntheticSource() throws IOException {
        boolean ignoreMalformed = supportsIgnoreMalformed() ? rarely() : false;
        assertSyntheticSource(syntheticSourceSupport(ignoreMalformed).example(5));
    }
    public final void testSyntheticSourceIgnoreMalformedExamples() throws IOException {
        assumeTrue("type doesn't support ignore_malformed", supportsIgnoreMalformed());
        CheckedConsumer<XContentBuilder, IOException> mapping = syntheticSourceSupport(true).example(1).mapping();
        for (ExampleMalformedValue v : exampleMalformedValues()) {
            assertSyntheticSource(new SyntheticSourceExample(v.value, v.value, mapping));
        }
    }
    private void assertSyntheticSource(SyntheticSourceExample example) throws IOException {
        DocumentMapper mapper = createDocumentMapper(syntheticSourceMapping(b -> {
            b.startObject("field");
            example.mapping().accept(b);
            b.endObject();
        }));
        assertThat(syntheticSource(mapper, example::buildInput), equalTo(example.expected()));
    }
    protected boolean supportsEmptyInputArray() {
        return true;
    }
    public final void testSyntheticSourceMany() throws IOException {
        boolean ignoreMalformed = supportsIgnoreMalformed() ? rarely() : false;
        int maxValues = randomBoolean() ? 1 : 5;