PlacementData { int getOriginalPosition(final int position) { final int index = binarySearch(mAdjustedAdPositions, 0, mPlacedCount, position); if (index < 0) { return position - ~index; } return NOT_FOUND; } private  PlacementData(@NonNull final int[] desiredInsertionPositions);  final static int NOT_FOUND; }
@Test public void initialState_getOriginalPosition() { assertThat(adsAt15repeating.getOriginalPosition(0)).isEqualTo(0); assertThat(adsAt15repeating.getOriginalPosition(1)).isEqualTo(1); assertThat(adsAt15repeating.getOriginalPosition(10)).isEqualTo(10); assertThat(adsAt15repeating.getOriginalPosition(1000)).isEqualTo(1000); assertThat(noAds.getOriginalPosition(0)).isEqualTo(0); assertThat(noAds.getOriginalPosition(1000)).isEqualTo(1000); }