String indexId = template.requestBodyAndHeaders("direct:start", map, headers, String.class);
//now, verify GET
headers.put(ElasticsearchConfiguration.PARAM_OPERATION, ElasticsearchConfiguration.OPERATION_GET_BY_ID);
GetResponse response = template.requestBodyAndHeaders("direct:start", indexId, headers, GetResponse.class);
assertNotNull("response should not be null", response);
assertNotNull("response source should not be null", response.getSource());
//now, perform DELETE
headers.put(ElasticsearchConfiguration.PARAM_OPERATION, ElasticsearchConfiguration.OPERATION_DELETE);
DeleteResponse deleteResponse = template.requestBodyAndHeaders("direct:start", indexId, headers, DeleteResponse.class);
assertNotNull("response should not be null", deleteResponse);
//now, verify GET fails to find the indexed value
headers.put(ElasticsearchConfiguration.PARAM_OPERATION, ElasticsearchConfiguration.OPERATION_GET_BY_ID);
response = template.requestBodyAndHeaders("direct:start", indexId, headers, GetResponse.class);
assertNotNull("response should not be null", response);
assertNull("response source should be null", response.getSource());
}