PlacementData { int getAdjustedPosition(final int originalPosition) { int index = binarySearchGreaterThan(mOriginalAdPositions, mPlacedCount, originalPosition); return originalPosition + index; } private  PlacementData(@NonNull final int[] desiredInsertionPositions);  final static int NOT_FOUND; }
@Test public void initialState_getAdjustedPosition() { assertThat(adsAt15repeating.getAdjustedPosition(0)).isEqualTo(0); assertThat(adsAt15repeating.getAdjustedPosition(1)).isEqualTo(1); assertThat(adsAt15repeating.getAdjustedPosition(10)).isEqualTo(10); assertThat(adsAt15repeating.getAdjustedPosition(1000)).isEqualTo(1000); assertThat(noAds.getAdjustedPosition(0)).isEqualTo(0); assertThat(noAds.getAdjustedPosition(1000)).isEqualTo(1000); }