if (forcedLanguage.length > 0) {
xcb.field("_language", forcedLanguage[0]);
}
xcb.endObject().endObject();
ParseContext.Document doc =  docMapper.parse("person", "1", xcb.bytes()).rootDoc();
<BUG>assertThat(doc.get(docMapper.mappers().getMapper("file.language").names().indexName()), equalTo(expected));
</BUG>
}
@Test
public void testFrDetection() throws Exception {

if (forcedLanguage.length > 0) {
xcb.field("_language", forcedLanguage[0]);
}
xcb.endObject().endObject();
ParseContext.Document doc =  docMapper.parse("person", "1", xcb.bytes()).rootDoc();
assertThat(doc.get(docMapper.mappers().getMapper("file.language").fieldType().names().indexName()), equalTo(expected));
}
@Test
public void testFrDetection() throws Exception {
