@Test public void onBindViewHolder_BinderExists_Should_InOrder_TakeItem_Bind() { InOrder inOrder = Mockito.inOrder(itemBinder, core); adapter.onBindViewHolder(emptyViewHolder, EXISTING_BINDER_ITEM_POSITION); inOrder.verify(itemBinder).take(same(itemWithBinder)); inOrder.verify(core).doBind(same(itemBinder), any(ViewFinder.class)); }
@Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items);  }