@Test
public void testSampleIndex_NonRepeating() {

    IntSeries sample = Sampler.sampleIndex(50, 100, new SecureRandom());
    Set<Integer> seen = new HashSet<>();
    for (int i = 0; i < sample.size(); i++) {
        boolean repeated = !seen.add(i);
        assertFalse(repeated, i + " is present at least twice");
    }
}