@Test
void withinRanges() {

    int[] ranges = {1, 1, 2, 3, 5, 8, 20, 30};
    assertThat(IPv4Ranges.withinRanges(ranges, 0)).isFalse();
    assertThat(IPv4Ranges.withinRanges(ranges, 2)).isTrue();
    assertThat(IPv4Ranges.withinRanges(ranges, 3)).isTrue();
    assertThat(IPv4Ranges.withinRanges(ranges, 4)).isFalse();
    assertThat(IPv4Ranges.withinRanges(ranges, 9)).isFalse();
    assertThat(IPv4Ranges.withinRanges(ranges, 22)).isTrue();
    assertThat(IPv4Ranges.withinRanges(ranges, 31)).isFalse();
}