@Test public void testDBConnectionManagerConstructor() { Properties dbPoolingPropertiesMock = mock(Properties.class); when(dbPoolingPropertiesMock.getProperty(any(String.class), any(String.class))) .thenReturn(TRUE) .thenReturn("1"); dbcManager = DBConnectionManager.getInstance(); assertNotNull(dbcManager); assertEquals(false, dbcManager.isPoolingEnabled); assertNull(dbcManager.dbmsPoolTable); }
public static DBConnectionManager getInstance() { if (instance == null) { synchronized (DBConnectionManager.class) { if (instance == null) { instance = new DBConnectionManager(); } } } return instance; }
DBConnectionManager { public static DBConnectionManager getInstance() { if (instance == null) { synchronized (DBConnectionManager.class) { if (instance == null) { instance = new DBConnectionManager(); } } } return instance; } }
DBConnectionManager { public static DBConnectionManager getInstance() { if (instance == null) { synchronized (DBConnectionManager.class) { if (instance == null) { instance = new DBConnectionManager(); } } } return instance; } protected  DBConnectionManager(); }
DBConnectionManager { public static DBConnectionManager getInstance() { if (instance == null) { synchronized (DBConnectionManager.class) { if (instance == null) { instance = new DBConnectionManager(); } } } return instance; } protected  DBConnectionManager(); static DBConnectionManager getInstance(); void finalize(); synchronized Connection getConnection(DBType aDbType, String aAuthType, String aDbUrl, String aUsername, String aPassword, Properties properties); void cleanDataSources(); synchronized void shutdownDbmsPools(); int getDbmsPoolSize(); int getConnectionSize(DBType aDbType, String aDbUrl); int getCheckedOutConnectionSize(DBType aDbType, String aDbUrl); int getCheckedInConnectionSize(DBType aDbType, String aDbUrl); int getTotalConnectionSize(); int getTotalCheckedOutConnectionSize(); int getTotalCheckedInConnectionSize(); }
DBConnectionManager { public static DBConnectionManager getInstance() { if (instance == null) { synchronized (DBConnectionManager.class) { if (instance == null) { instance = new DBConnectionManager(); } } } return instance; } protected  DBConnectionManager(); static DBConnectionManager getInstance(); void finalize(); synchronized Connection getConnection(DBType aDbType, String aAuthType, String aDbUrl, String aUsername, String aPassword, Properties properties); void cleanDataSources(); synchronized void shutdownDbmsPools(); int getDbmsPoolSize(); int getConnectionSize(DBType aDbType, String aDbUrl); int getCheckedOutConnectionSize(DBType aDbType, String aDbUrl); int getCheckedInConnectionSize(DBType aDbType, String aDbUrl); int getTotalConnectionSize(); int getTotalCheckedOutConnectionSize(); int getTotalCheckedInConnectionSize();  }