}
private static GraphDatabaseService createInMemoryDatabase() throws Throwable {
try {
Map<String,String> config = Collections.singletonMap("execution_guard_enabled","true");
return new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().setConfig(config).newGraphDatabase();
} catch(RuntimeException re) {
Throwable t=re.getCause();
if (t instanceof RuntimeException) throw (RuntimeException)t;
if (t instanceof Error) throw (Error)t;
throw t;