@Test
public void testBulkErrorInvalidRequest() {

	elasticsearchClient.sendBulk(os ->
			os.write(("{ \"update\" : {\"_id\" : \"1\", \"_type\" : \"type1\", \"_index\" : \"index1\", \"_retry_on_conflict\" : 3} }\n" +
					"{ \"doc\" : {\"field\" : \"value\"} }\n").getBytes("UTF-8")));
	assertThat(testAppender.list).hasSize(1);
	final ILoggingEvent event = testAppender.list.get(0);
	assertThat(event.getLevel().toString()).isEqualTo("WARN");
	assertThat(event.getMessage()).startsWith("Error(s) while sending a _bulk request to elasticsearch: {}");
}