@@ -0,0 +1,2175 @@
+package org.xbib.elasticsearch.plugin.knapsack;%0A%0Aimport org.elasticsearch.client.Client;%0Aimport org.elasticsearch.common.network.NetworkUtils;%0Aimport org.elasticsearch.common.settings.Settings;%0Aimport org.elasticsearch.node.Node;%0Aimport org.junit.Test;%0Aimport org.xbib.elasticsearch.action.knapsack.exp.KnapsackExportRequestBuilder;%0Aimport org.xbib.elasticsearch.action.knapsack.exp.KnapsackExportResponse;%0Aimport org.xbib.elasticsearch.action.knapsack.imp.KnapsackImportRequestBuilder;%0Aimport org.xbib.elasticsearch.action.knapsack.imp.KnapsackImportResponse;%0A%0Aimport static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;%0Aimport static org.elasticsearch.node.NodeBuilder.nodeBuilder;%0A%0Apublic class KnapsackNodeTest  %7B%0A%0A    @Test%0A    public void testNodeExport() throws Exception %7B%0A        Settings settings = settingsBuilder()%0A                .put(%22cluster.name%22, %22test-cluster-%22 + NetworkUtils.getLocalAddress().getHostName())%0A                .put(%22gateway.type%22, %22none%22)%0A                .put(%22index.store.type%22, %22memory%22)%0A                .put(%22http.enabled%22, false)%0A                .put(%22discovery.zen.multicast.enabled%22, false)%0A                .build();%0A        Node node = nodeBuilder().settings(settings).build();%0A        node.start();%0A        Client client = node.client();%0A%0A        // cluster healthy?%0A        client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();%0A%0A        // dummy export%0A        KnapsackExportRequestBuilder knapsackExportRequestBuilder =%0A                new KnapsackExportRequestBuilder(client.admin().indices());%0A        KnapsackExportResponse knapsackExportResponse =%0A                knapsackExportRequestBuilder.execute().actionGet();%0A%0A        Thread.sleep(1000L);%0A%0A        // dummy import%0A        KnapsackImportRequestBuilder knapsackImportRequestBuilder =%0A                new KnapsackImportRequestBuilder(client.admin().indices());%0A        KnapsackImportResponse knapsackImportResponse = knapsackImportRequestBuilder.execute().actionGet();%0A%0A        // delete _all.tar.gz for next test%0A        knapsackImportResponse.getState().getPath().toFile().delete();%0A%0A        node.stop();%0A    %7D%0A%0A%7D%0A

add simple node test