LimitAdapter extends PowerAdapterWrapper { @NonNull @Override public Object getItemViewType(int position) { return super.getItemViewType(assertWithinRange(position)); } LimitAdapter(@NonNull PowerAdapter adapter);  LimitAdapter(@NonNull PowerAdapter adapter, int limit); int getLimit(); void setLimit(int limit); @Override int getItemCount(); @Override long getItemId(int position); @NonNull @Override Object getItemViewType(int position); @Override boolean isEnabled(int position);  }
@Test(expected = IndexOutOfBoundsException.class) public void getItemViewTypeOutOfBoundsThrows() { mLimitAdapter.getItemViewType(7); }