transportClient = new TransportClient(settingsBuilder()
.put("cluster.name", internalCluster().getClusterName())
.put("name", "programmatic_transport_client")
.put("client.transport.nodes_sampler_interval", "1s")
.build());
Transport transport = internalCluster().getDataNodeInstance(Transport.class);
transportClient.addTransportAddress(transport.boundAddress().publishAddress());
}
return transportClient;
}