*
* @param performanceTest to create a database for.
* @param params with which the test will be run.
*/
private void createDatabase(PerformanceTest performanceTest, Map<String, Object> params) {
GraphDatabaseBuilder graphDatabaseBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(temporaryFolder.getRoot().getPath());
Map<String, String> dbConfig = performanceTest.databaseParameters(params);
if (dbConfig != null) {
graphDatabaseBuilder = graphDatabaseBuilder.setConfig(dbConfig);
}
database = graphDatabaseBuilder.newGraphDatabase();
performanceTest.prepareDatabase(database, params);
}