@Test public void testUnregisterOnDataSetListener() { final TestAdapter adapter = new TestAdapter(context); final OnDataSetListener mockListener = mock(OnDataSetListener.class); adapter.registerOnDataSetListener(mockListener); adapter.registerOnDataSetListener(mockListener); adapter.unregisterOnDataSetListener(mockListener); adapter.notifyDataSetChanged(); adapter.notifyDataSetInvalidated(); verifyZeroInteractions(mockListener); }
@Override public void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener) { if (dataSetListeners != null) this.dataSetListeners.unregisterOnDataSetListener(listener); }
BaseListAdapter extends android.widget.BaseAdapter implements
		DataSetAdapter<I>,
		AdapterHolder.FactoryAdapter<VH>,
		AdapterHolder.BinderAdapter<A, VH> { @Override public void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener) { if (dataSetListeners != null) this.dataSetListeners.unregisterOnDataSetListener(listener); } }
BaseListAdapter extends android.widget.BaseAdapter implements
		DataSetAdapter<I>,
		AdapterHolder.FactoryAdapter<VH>,
		AdapterHolder.BinderAdapter<A, VH> { @Override public void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener) { if (dataSetListeners != null) this.dataSetListeners.unregisterOnDataSetListener(listener); } BaseListAdapter(@NonNull final Context context); }
BaseListAdapter extends android.widget.BaseAdapter implements
		DataSetAdapter<I>,
		AdapterHolder.FactoryAdapter<VH>,
		AdapterHolder.BinderAdapter<A, VH> { @Override public void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener) { if (dataSetListeners != null) this.dataSetListeners.unregisterOnDataSetListener(listener); } BaseListAdapter(@NonNull final Context context); @NonNull final Context getContext(); @NonNull final Resources getResources(); @Override void registerOnDataSetListener(@NonNull final OnDataSetListener listener); @Override void notifyDataSetChanged(); @Override void notifyDataSetInvalidated(); @Override void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener); @Override void registerOnDataSetActionListener(@NonNull final OnDataSetActionListener listener); @SuppressWarnings("SimplifiableIfStatement") boolean notifyDataSetActionSelected(final int action, final int position, @Nullable final Object payload); @Override void unregisterOnDataSetActionListener(@NonNull final OnDataSetActionListener listener); @Override final int getCount(); @Override boolean hasItemAt(final int position); @Override long getItemId(final int position); @Override void setHolderFactory(@Nullable final AdapterHolder.Factory<VH> factory); @Override @Nullable AdapterHolder.Factory<VH> getHolderFactory(); @Override void setHolderBinder(@Nullable final AdapterHolder.Binder<A, VH> binder); @Override @Nullable AdapterHolder.Binder<A, VH> getHolderBinder(); @SuppressWarnings("unchecked") @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @NonNull View inflateView(@LayoutRes final int resource, @Nullable final ViewGroup parent); @Override @CallSuper @NonNull Parcelable saveInstanceState(); @Override @CallSuper void restoreInstanceState(@NonNull Parcelable savedState); }
BaseListAdapter extends android.widget.BaseAdapter implements
		DataSetAdapter<I>,
		AdapterHolder.FactoryAdapter<VH>,
		AdapterHolder.BinderAdapter<A, VH> { @Override public void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener) { if (dataSetListeners != null) this.dataSetListeners.unregisterOnDataSetListener(listener); } BaseListAdapter(@NonNull final Context context); @NonNull final Context getContext(); @NonNull final Resources getResources(); @Override void registerOnDataSetListener(@NonNull final OnDataSetListener listener); @Override void notifyDataSetChanged(); @Override void notifyDataSetInvalidated(); @Override void unregisterOnDataSetListener(@NonNull final OnDataSetListener listener); @Override void registerOnDataSetActionListener(@NonNull final OnDataSetActionListener listener); @SuppressWarnings("SimplifiableIfStatement") boolean notifyDataSetActionSelected(final int action, final int position, @Nullable final Object payload); @Override void unregisterOnDataSetActionListener(@NonNull final OnDataSetActionListener listener); @Override final int getCount(); @Override boolean hasItemAt(final int position); @Override long getItemId(final int position); @Override void setHolderFactory(@Nullable final AdapterHolder.Factory<VH> factory); @Override @Nullable AdapterHolder.Factory<VH> getHolderFactory(); @Override void setHolderBinder(@Nullable final AdapterHolder.Binder<A, VH> binder); @Override @Nullable AdapterHolder.Binder<A, VH> getHolderBinder(); @SuppressWarnings("unchecked") @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @NonNull View inflateView(@LayoutRes final int resource, @Nullable final ViewGroup parent); @Override @CallSuper @NonNull Parcelable saveInstanceState(); @Override @CallSuper void restoreInstanceState(@NonNull Parcelable savedState);  }