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 testDatetimePartitioningWithSingleKey() {
    JdbcReadWithPartitionsHelper<DateTime> helper =
        JdbcUtil.getPartitionsHelper(TypeDescriptor.of(DateTime.class));
    DateTime onlyPoint = DateTime.now();
    List<KV<DateTime, DateTime>> expectedRanges =
        Lists.newArrayList(KV.of(onlyPoint, onlyPoint.plusMillis(1)));
    List<KV<DateTime, DateTime>> ranges =
        Lists.newArrayList(helper.calculateRanges(onlyPoint, onlyPoint, 10L));
    // It is not possible to generate any more than one range, because the lower and upper range are
    // exactly the same.
    // The range goes from the current DateTime to ONE MILISECOND AFTER.
    // Because the query's filter statement is : WHERE column >= lowerBound AND column < upperBound.
    assertEquals(1, ranges.size());
    assertArrayEquals(expectedRanges.toArray(), ranges.toArray());
  }