Neo4jFactoryImpl implements Neo4jFactory { protected GraphDatabaseFactory createGraphDatabaseFactory(Map<String, String> config) { if (config != null && config.containsKey("ha.server_id")) return new HighlyAvailableGraphDatabaseFactory(); return new GraphDatabaseFactory(); }  @Override Neo4jGraphAPI newGraphDatabase(String path, Map<String, String> config);  }
@Test public void testCreateGraphDatabaseFactory() throws Exception { GraphDatabaseFactory factory = new Neo4jFactoryImpl().createGraphDatabaseFactory(Collections.singletonMap("ha.server_id", "1")); assertEquals(true, factory instanceof HighlyAvailableGraphDatabaseFactory); }