SmartRegisterPaginatedAdapter extends BaseAdapter { @Override public View getView(int i, View parentView, ViewGroup viewGroup) { return listItemProvider.getView((SmartRegisterClient) getItem(actualPosition(i)), parentView, viewGroup); } SmartRegisterPaginatedAdapter(SmartRegisterClientsProvider listItemProvider);  SmartRegisterPaginatedAdapter(
            int clientsPerPage, SmartRegisterClientsProvider listItemProvider); @Override int getCount(); @Override Object getItem(int i); @Override long getItemId(int i); @Override View getView(int i, View parentView, ViewGroup viewGroup); int pageCount(); int currentPage(); void nextPage(); void previousPage(); boolean hasNextPage(); boolean hasPreviousPage(); void refreshList(FilterOption villageFilter, ServiceModeOption serviceModeOption,
                            FilterOption searchFilter, SortOption sortOption);  }
@Test public void getViewShouldDelegateCallToProviderGetViewWithProperClient() { FakeClientsProvider fakeClientsProvider = new FakeClientsProvider(getSmartRegisterClients(50)); SmartRegisterPaginatedAdapter adapter = getAdapter(fakeClientsProvider); adapter.getView(0, null, null); assertEquals("Name0", fakeClientsProvider.getViewCurrentClient.name()); adapter.getView(49, null, null); assertEquals("Name49", fakeClientsProvider.getViewCurrentClient.name()); }