@Test public void testCorrectPositionOnEmptyHeaders() { final TestModule module = new TestModule(); for (int i = 0; i < 10; i++) { assertThat(module.correctPosition(i), is(i)); } }
public int correctPosition(final int position) { return position - countHeadersBeforePosition(position); }
HeadersModule extends AdapterModule { public int correctPosition(final int position) { return position - countHeadersBeforePosition(position); } }
HeadersModule extends AdapterModule { public int correctPosition(final int position) { return position - countHeadersBeforePosition(position); }  }
HeadersModule extends AdapterModule { public int correctPosition(final int position) { return position - countHeadersBeforePosition(position); }  boolean isEmpty(); int size(); boolean isHeaderAt(final int position); @Nullable H getHeader(final int position); @NonNull SparseArray<H> getHeaders(); void clearHeaders(); int correctPosition(final int position); int countHeadersBeforePosition(final int position); void setHeaderStyleAttr(@AttrRes final int styleAttr); @AttrRes int getHeaderStyleAttr(); @NonNull abstract VH createViewHolder(@NonNull ViewGroup parent, int viewType); @NonNull final SimpleHeaderHolder createSimpleHeaderHolder(@NonNull ViewGroup parent); abstract void bindViewHolder(@NonNull VH viewHolder, int position); }
HeadersModule extends AdapterModule { public int correctPosition(final int position) { return position - countHeadersBeforePosition(position); }  boolean isEmpty(); int size(); boolean isHeaderAt(final int position); @Nullable H getHeader(final int position); @NonNull SparseArray<H> getHeaders(); void clearHeaders(); int correctPosition(final int position); int countHeadersBeforePosition(final int position); void setHeaderStyleAttr(@AttrRes final int styleAttr); @AttrRes int getHeaderStyleAttr(); @NonNull abstract VH createViewHolder(@NonNull ViewGroup parent, int viewType); @NonNull final SimpleHeaderHolder createSimpleHeaderHolder(@NonNull ViewGroup parent); abstract void bindViewHolder(@NonNull VH viewHolder, int position);  }