OffsetData extends DataWrapper<T> { public int getOffset() { return mOffset; } OffsetData(@NonNull Data<? extends T> data, int offset); int getOffset(); void setOffset(int offset); @NonNull @Override T get(int position, int flags); @Override int size();  }
@Test public void negativeOffsetClamped() { configure(3, 5); OffsetData<String> offsetData = new OffsetData<>(mFakeData, -10); assertThat(offsetData.getOffset()).isEqualTo(0); assertThat(offsetData).containsExactly("0", "1", "2", "3", "4").inOrder(); }