@@ -0,0 +1,2883 @@
+package org.unipop.elastic2.misc;%0A%0Aimport org.apache.commons.configuration.BaseConfiguration;%0Aimport org.apache.commons.configuration.Configuration;%0Aimport org.apache.tinkerpop.gremlin.LoadGraphWith;%0Aimport org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;%0Aimport org.apache.tinkerpop.gremlin.structure.Graph;%0Aimport org.apache.tinkerpop.gremlin.structure.T;%0Aimport org.apache.tinkerpop.gremlin.structure.Vertex;%0Aimport org.elasticsearch.client.Client;%0Aimport org.elasticsearch.common.settings.Settings;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.unipop.controllerprovider.ControllerManagerFactory;%0Aimport org.unipop.elastic2.ElasticGraphProvider;%0Aimport org.unipop.elastic2.controllermanagers.BasicElasticControllerManager;%0Aimport org.unipop.elastic2.helpers.ElasticClientFactory;%0Aimport org.unipop.elastic2.helpers.ElasticHelper;%0A%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0Aimport java.util.concurrent.ExecutionException;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0A%0A/**%0A * Created by andy.shiue on 15/01/2016.%0A */%0Apublic class BasicTests %7B%0A%0A    private Graph graph;%0A    private ElasticGraphProvider elasticGraphProvider;%0A%0A    @Before%0A    public void startUp() throws InstantiationException, IOException, ExecutionException, InterruptedException %7B%0A        elasticGraphProvider = new ElasticGraphProvider();%0A        HashMap%3CString, Object%3E config = new HashMap%3C%3E();%0A        final Configuration configuration = elasticGraphProvider.newGraphConfiguration(%22testgraph%22, this.getClass(), %22basicTests%22, config, LoadGraphWith.GraphData.MODERN);%0A        this.graph = elasticGraphProvider.openTestGraph(configuration);%0A    %7D%0A%0A    @Test%0A    public void test() throws  InstantiationException %7B%0A        graph.addVertex(T.id, %22v1%22, %22field%22, %22a%22, %22field2%22, %22c%22);%0A        graph.addVertex(T.id, %22v2%22, %22field%22, %22b%22, %22field2%22, %22d%22);%0A        graph.addVertex(T.id, %22v3%22, %22field%22, %221%22, %22field2%22, %22d%22);%0A        Vertex v1 = graph.traversal().V(%22v1%22).next();%0A        Vertex v2 = graph.traversal().V(%22v2%22).next();%0A        Vertex v3 = graph.traversal().V(%22v3%22).next();%0A        v1.addEdge(%221To2%22, v2);%0A        v1.addEdge(%221To3%22, v3);%0A        GraphTraversal%3CVertex, Vertex%3E traversal = graph.traversal().V(%22v1%22).out(%221To2%22).has(%22field%22, %22b%22);%0A        Vertex vOutHas = traversal.next();%0A        assertEquals(%22a%22, v1.property(%22field%22).value());%0A        assertEquals(%22c%22, v1.property(%22field2%22).value());%0A        assertEquals(%22b%22, vOutHas.property(%22field%22).value());%0A%0A        assertEquals(3, graph.traversal().V().toList().size());%0A        v2.remove();%0A        assertEquals(2, graph.traversal().V().toList().size());%0A%0A    %7D%0A%0A    @After%0A    public void shutDown() throws Exception %7B%0A        ElasticHelper.clearIndex(elasticGraphProvider.getClient(), %22testgraph%22);%0A        graph.close();%0A    %7D%0A%7D%0A

add a basic test for my own testing and investigation