" }\n" +
"}"
).execute().actionGet();
for (int i = 0; i < 10; i++) {
final AnalyzeRequestBuilder requestBuilder = client.admin().indices().prepareAnalyze("test", "THIS IS A TEST");
requestBuilder.setField("document.simple");
AnalyzeResponse analyzeResponse = requestBuilder.execute().actionGet();
assertThat(analyzeResponse.tokens().size(), equalTo(4));
AnalyzeResponse.AnalyzeToken token = analyzeResponse.tokens().get(3);
assertThat(token.term(), equalTo("test"));
assertThat(token.startOffset(), equalTo(10));
assertThat(token.endOffset(), equalTo(14));