### Question:
DBManagerFactory { public synchronized static DBManager getInstance() { if (dbManager == null) { if (REDIS_DB.equalsIgnoreCase(OAuthServer.getDatabase())) { dbManager = new RedisDBManager(); } else if (MONGO_DB.equalsIgnoreCase(OAuthServer.getDatabase())) { dbManager = new MongoDBManager(); } else if (CASSANDRA_DB.equalsIgnoreCase(OAuthServer.getDatabase())) { dbManager = new CassandraDBManager(OAuthServer.getCassandraContactPoints()); } else { dbManager = new HazelcastDBManager(); } } return dbManager; }  synchronized static DBManager getInstance(); static void init(); static final String REDIS_DB; static final String MONGO_DB; static final String CASSANDRA_DB; static final String DEFAULT_DB; }### Answer:
@Test public void when_mongo_oauth20_database_set_return_mongodb_manager() throws Exception { MockDBManagerFactory.deinstall(); OAuthServer.log = mock(Logger.class); String path = getClass().getClassLoader().getResource("apifest-oauth-test.properties").getPath(); System.setProperty("properties.file", path); OAuthServer.loadConfig(); DBManager dbManager = DBManagerFactory.getInstance(); assertTrue(dbManager instanceof MongoDBManager); System.setProperty("properties.file", ""); }