/**
* For subclasses to override. Overrides must call {@code super.setUp()}.
*/
@Before
@Override
public void setUp() throws Exception {
super.setUp();
String settings = StreamsUtils.copyToStringFromClasspath("/test-settings.json");
String mapping = StreamsUtils.copyToStringFromClasspath("/test-mapping.json");
client().admin().indices().prepareCreate(INDEX).setSettings(settings).addMapping(TYPE, mapping).get();
refresh();
Thread.sleep(75); // Ensure that the shard is available before we start making analyze requests.
}