.copiedBytes());
// when the type is not the first one, we don't confuse it...
assertThat(doc.rootDoc().get("type.type_field"), equalTo("type_value"));
assertThat(doc.rootDoc().get("test1"), equalTo("value1"));
assertThat(doc.rootDoc().get("test2"), equalTo("value2"));
assertThat(doc.rootDoc().get("inner.inner_field"), equalTo("inner_value"));
}
@Test public void testTypeLevelWithFieldTypeAsObjectNotFirst() throws Exception {
String defaultMapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().endObject().string();