class RepositoryAdapter extends RecyclerView.Adapter<ViewHolder> implements Updatable {

  @Override
  public final long getItemId(final int position) {
    resolveIndices(position);
    return parts[resolvedPartIndex].getItemId(resolvedItemIndex, staticItemCount);
  }

}

class RepositoryAdapterTest {

  private static final int MULTI_ITEM_COUNT;
  private static final int STATIC_ITEM_COUNT;
  private static final List<String> REPOSITORY_LIST;
  private static final String REPOSITORY_ITEM;
  private static final String ALTERNATIVE_REPOSITORY_ITEM;
  private static final String ITEM;
  @LayoutRes
  private static final int LAYOUT_ID;
  @Mock
  private RepositoryPresenter repositoryPresenter;
  @Mock
  private RepositoryPresenter secondRepositoryPresenter;
  @Mock
  private RepositoryPresenter singleItemRepositoryPresenter;
  @Mock
  private RepositoryPresenter multiItemRepositoryPresenter;
  @Mock
  private RepositoryPresenter zeroItemRepositoryPresenter;
  @Mock
  private LayoutPresenter layoutPresenter;
  @Mock
  private LayoutPresenter secondLayoutPresenter;
  @Mock
  private ViewHolder viewHolder;
  @Mock
  private ViewGroup viewGroup;
  @Mock
  private Context context;
  @Mock
  private LayoutInflater layoutInflater;
  @Mock
  private View view;
  @Mock
  private Activity activity;
  @Mock
  private Application application;
  @Mock
  private AdapterDataObserver observer;
  private UpdateDispatcher updateDispatcher;
  private MutableRepository repository;
  private Repository secondRepository;
  private RepositoryAdapter repositoryAdapter;
  private RepositoryAdapter repositoryAdapterWithoutStatic;
  private Adapter repositoryAdapterWhileResumed;
  private Adapter repositoryAdapterWhileStarted;

  @Test
  public void shouldReturnItemIdFromFirstPresenter() {

    when(repositoryPresenter.getItemId(REPOSITORY_ITEM, 0)).thenReturn(10L);
    assertThat(repositoryAdapter.getItemId(0), is(10L + STATIC_ITEM_COUNT));

    verify(secondRepositoryPresenter, never()).getItemId(any(), anyInt());
  }

}