.endObject().endObject().string();
DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
// serialize the id mapping
XContentBuilder builder = XContentFactory.jsonBuilder().startObject();
builder = docMapper.idFieldMapper().toXContent(builder, ToXContent.EMPTY_PARAMS);
builder.endObject();
String serialized_id_mapping = builder.string();
String expected_id_mapping = XContentFactory.jsonBuilder().startObject()
.startObject("_id").field("path", "my_path").endObject()