### Question:
DBDefinitionFactory { public static DBDefinition getDefinition(String dbName){ if (dbMap.containsKey(dbName)){ return dbMap.get(dbName); } return getReconDBDefinition(dbName); } private  DBDefinitionFactory(); static DBDefinition getDefinition(String dbName);  }### Answer:
@Test public void testGetDefinition() { DBDefinition definition = DBDefinitionFactory.getDefinition(new OMDBDefinition().getName()); assertTrue(definition instanceof OMDBDefinition); definition = DBDefinitionFactory.getDefinition( new SCMDBDefinition().getName()); assertTrue(definition instanceof SCMDBDefinition); definition = DBDefinitionFactory.getDefinition( new ReconSCMDBDefinition().getName()); assertTrue(definition instanceof ReconSCMDBDefinition); definition = DBDefinitionFactory.getDefinition( RECON_OM_SNAPSHOT_DB + "_1"); assertTrue(definition instanceof OMDBDefinition); definition = DBDefinitionFactory.getDefinition( RECON_CONTAINER_KEY_DB + "_1"); assertTrue(definition instanceof ReconDBDefinition); }