### Question:
RVRendererAdapter extends RecyclerView.Adapter<RendererViewHolder> { @Override public RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { rendererBuilder.withParent(viewGroup); rendererBuilder.withLayoutInflater(LayoutInflater.from(viewGroup.getContext())); rendererBuilder.withViewType(viewType); RendererViewHolder viewHolder = rendererBuilder.buildRendererViewHolder(); if (viewHolder == null) { throw new NullRendererBuiltException("RendererBuilder have to return a not null viewHolder"); } return viewHolder; } RVRendererAdapter(RendererBuilder<T> rendererBuilder);  RVRendererAdapter(RendererBuilder<T> rendererBuilder, AdapteeCollection<T> collection); @Override int getItemCount(); T getItem(int position); @Override long getItemId(int position); void setCollection(AdapteeCollection<T> collection); @Override int getItemViewType(int position); @Override RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(RendererViewHolder viewHolder, int position); boolean add(T element); boolean remove(Object element); boolean addAll(Collection<? extends T> elements); boolean removeAll(Collection<?> elements); void clear(); void diffUpdate(List<T> newList);  }### Answer:
@Test public void shouldBuildRendererUsingAllNeededDependencies() { when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT); when(mockedRendererBuilder.buildRendererViewHolder()).thenReturn(mockedRendererViewHolder); adapter.onCreateViewHolder(mockedParent, ANY_ITEM_VIEW_TYPE); verify(mockedRendererBuilder).withParent(mockedParent); verify(mockedRendererBuilder).withLayoutInflater((LayoutInflater) notNull()); verify(mockedRendererBuilder).withViewType(ANY_ITEM_VIEW_TYPE); verify(mockedRendererBuilder).buildRendererViewHolder(); }
@Test(expected = NullRendererBuiltException.class) public void shouldThrowNullRendererBuiltException() { adapter.onCreateViewHolder(mockedParent, ANY_ITEM_VIEW_TYPE); }