@Override
    public DataSource get() {
        StickyDataSourceHolder holder = holders.get();
        if (holder != null && isAvailable(holder)) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Return the sticky DataSource " + holder.getDataSource().toString() + " directly.");
            }
            return holder.getDataSource();
        }
        LOG.debug("Return a random DataSource.");
        DataSource dataSource = super.get();
        holder = new StickyDataSourceHolder(dataSource);
        holders.remove();
        holders.set(holder);
        return dataSource;
    }
@Test
    public void testGetSameDataSourceInFiveSeconds() throws InterruptedException {
        StickyRandomDataSourceSelector selector = new StickyRandomDataSourceSelector(dataSource);
        int lastHashCode = selector.get().hashCode();
        for (int i = 0; i < 4; i++) {
            assertEquals(lastHashCode, selector.get().hashCode());
            Thread.sleep(1000);
        }
    }