FormSectionPagerAdapter extends PagerAdapter { @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) object); }  @Override int getCount(); @Override boolean isViewFromObject(View view, Object object); @Override Object instantiateItem(ViewGroup container, int position); @Override void destroyItem(ViewGroup container, int position, Object object); @Override boolean equals(Object other); boolean equals(FormSectionPagerAdapter that);  }
@Test public void testDestroyItem() { ViewGroup group = mock(ViewGroup.class); View view = mock(View.class); adapter.destroyItem(group, 0, view); verify(group).removeView(view); }