Converting Node Client to Transport client?

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I edited your post.

As I said, running elasticsearch embedded is not supported.

When testing, I'm using elasticsearch-maven-plugin and I'm just creating a TransportClient from my tests:

Something like:

    @BeforeClass
    public static void testElasticsearchIsRunning() {
        try {
            client = new PreBuiltTransportClient(Settings.builder().put("client.transport.ignore_cluster_name", true).build())
                    .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9300)));
            client.admin().cluster().prepareHealth().setTimeout(TimeValue.timeValueMillis(200)).get();
        } catch (Exception e) {
            assumeNoException(e);
        }
    }

    @AfterClass
    public static void stopClient() {
        if (client != null) {
            client.close();
            client = null;
        }
    }