code: @Deprecated
  	private static void createTemplateWithJsonInElasticsearch(Client client, String template, String json) throws Exception {
  		logger.trace("createTemplate([{}])", template);
  
  		assert client != null;
  		assert template != null;
  
          AcknowledgedResponse response = client.admin().indices()
  				.preparePutTemplate(template)
  				.setSource(json.getBytes(), XContentType.JSON)
  				.get();
  
  		if (!response.isAcknowledged()) {
  			logger.warn("Could not create template [{}]", template);
  			throw new Exception("Could not create template ["+template+"].");
  		}
  
  		logger.trace("/createTemplate([{}])", template);
  	}
docs: Create a new index in Elasticsearch
  @param client Elasticsearch client
  @param template Template name
  @param json JSon content for the template
  @throws Exception if something goes wrong
  @deprecated Will be removed when we don't support TransportClient anymore