static <T> @Nullable JdbcReadWithPartitionsHelper<T> getPartitionsHelper(TypeDescriptor<T> type) {
    // This cast is unchecked, thus this is a small type-checking risk. We just need
    // to make sure that all preset helpers in `JdbcUtil.PRESET_HELPERS` are matched
    // in type from their Key and their Value.
    return (JdbcReadWithPartitionsHelper<T>) PRESET_HELPERS.get(type.getRawType());
  }
@Test
  public void testLongPartitioningNotEnoughRanges() {
    JdbcReadWithPartitionsHelper<Long> helper =
        JdbcUtil.getPartitionsHelper(TypeDescriptors.longs());
    // The minimum stride is one, which is what causes this sort of partitioning.
    List<KV<Long, Long>> expectedRanges =
        Lists.newArrayList(KV.of(12L, 14L), KV.of(14L, 16L), KV.of(16L, 18L), KV.of(18L, 21L));
    List<KV<Long, Long>> ranges = Lists.newArrayList(helper.calculateRanges(12L, 20L, 10L));
    // The ranges go from the current lowerBound to ONE ELEMENT AFTER the upper bound.
    // Because the query's filter statement is : WHERE column >= lowerBound AND column < upperBound.
    assertEquals(4, ranges.size());
    assertArrayEquals(expectedRanges.toArray(), ranges.toArray());
  }