@Test
public void testGetConnection() throws SQLException {

    
    PoolableDataSource mockDataRwSrc = Mockito.mock(PoolableDataSource.class);
    Connection rwMockConn = Mockito.mock(Connection.class);
    Mockito.doReturn(rwMockConn).when(mockDataRwSrc).getConnection();
    
    PoolableDataSource mockDataRoSrc = Mockito.mock(PoolableDataSource.class);
    Connection roMockConn = Mockito.mock(Connection.class);
    Mockito.doReturn(roMockConn).when(mockDataRoSrc).getConnection();
    JDBCObjectStore store = new JDBCObjectStore(mockDataRwSrc, mockDataRoSrc);
    
    JDBCConnection jdbcConn = (JDBCConnection) store.getConnection(true, true);
    assertEquals(jdbcConn.con, rwMockConn);
    
    jdbcConn = (JDBCConnection) store.getConnection(true, false);
    assertEquals(jdbcConn.con, roMockConn);
}