TreeAdapter extends PowerAdapter { @Override public void bindView( @NonNull Container container, @NonNull View view, @NonNull Holder holder, @NonNull List<Object> payloads ) { outerToAdapter(holder.getPosition()).bindView(container, view, holder, payloads); } TreeAdapter(@NonNull PowerAdapter rootAdapter, @NonNull ChildAdapterSupplier childAdapterSupplier); @NonNull Parcelable saveInstanceState(); void restoreInstanceState(@Nullable Parcelable parcelable); boolean isAutoExpand(); void setAutoExpand(boolean autoExpand); boolean isExpanded(int position); void setExpanded(int position, boolean expanded); boolean toggleExpanded(int position); void setAllExpanded(boolean expanded); @Override int getItemCount(); @Override boolean hasStableIds(); @Override long getItemId(int position); @Override boolean isEnabled(int position); @NonNull @Override Object getItemViewType(int position); @NonNull @Override View newView(@NonNull ViewGroup parent, @NonNull Object viewType); @Override void bindView(
            @NonNull Container container,
            @NonNull View view,
            @NonNull Holder holder,
            @NonNull List<Object> payloads
    );  }
@Test public void rootBindViewDelegated() { mTreeAdapter.bindView(mContainer, mItemView, holder(8), emptyList()); verify(mRootAdapter).bindView(any(Container.class), eq(mItemView), argThat(holderWithPosition(2)), anyList()); }
@Test public void childBindViewDelegated() { mTreeAdapter.bindView(mContainer, mItemView, holder(10), emptyList()); verifyBindViewNeverCalled(mChildAdapters.get(0)); verifyBindViewNeverCalled(mChildAdapters.get(1)); verify(mChildAdapters.get(2)).bindView(any(Container.class), eq(mItemView), argThat(holderWithPosition(1)), anyList()); }