package com.gentics.mesh.test;

import javax.annotation.PostConstruct;

import org.elasticsearch.node.Node;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.gentics.mesh.cli.Mesh;
import com.gentics.mesh.etc.config.MeshOptions;
import com.gentics.mesh.graphdb.OrientDBDatabaseProviderImpl;

@Configuration
@ComponentScan(basePackages = { "com.gentics.mesh" })
public class SpringTestConfiguration {

	@Bean
	public String graphProviderClassname() {
		// return TinkerGraphDatabaseProviderImpl.class.getName();
		return OrientDBDatabaseProviderImpl.class.getName();
		// return TitanDBDatabaseProviderImpl.class.getName();
	}

	@Bean
	public Node elasticSearchNode() {
		// For testing it is not needed to start ES in most cases. This will speedup test execution since ES does not need to initialize.
		return null;
	}

	@PostConstruct
	public void setup() {
		MeshOptions options = new MeshOptions();
		options.setDatabaseProviderClass(graphProviderClassname());
		options.setHttpPort(TestUtil.getRandomPort());
		Mesh.initalize(options);
	}

}

@@ -390,24 +390,27 @@
 graphdb.
-OrientDB
+TinkerGraph
 Database
@@ -584,19 +584,16 @@
 e() %7B%0A%09%09
-// 
 return T
@@ -642,16 +642,18 @@
 me();%0A%09%09
+//
 return O

Switch tests back to tinkerpop graph api