Code example for PagerAdapter

2
        assertFalse(listener.onPageSelectedCalled);
        pager.setCurrentItem(pager.getCurrentItem());
        assertFalse(listener.onPageSelectedCalled);
    } 
 
    private static class TestPagerAdapter extends PagerAdapter { 
        @Override 
        public int getCount() { 
            return 3; 
        } 
 
        @Override 
        public boolean isViewFromObject(View view, Object object) {
            return false; 
        } 
    } 
 
    private static class TestOnPageChangeListener extends ViewPager.SimpleOnPageChangeListener { 
        public boolean onPageSelectedCalled;
 
        @Override