NanoDuration { private NanoDuration() { } private  NanoDuration(); static SchemaBuilder builder(); static Schema schema(); static long durationNanos(int years, int months, int days, int hours, int minutes, long seconds, long nanos); static long durationNanos(int years, int months, int days, int hours, int minutes, long seconds); static final String SCHEMA_NAME; }
@Test @FixFor("DBZ-1405") public void testNanoDuration() { long years = 6 * 12 * 30 * ChronoUnit.DAYS.getDuration().toNanos(); long months = 7 * 30 * ChronoUnit.DAYS.getDuration().toNanos(); long days = 1 * ChronoUnit.DAYS.getDuration().toNanos(); long hours = 2 * ChronoUnit.HOURS.getDuration().toNanos(); long minutes = 3 * ChronoUnit.MINUTES.getDuration().toNanos(); long seconds = 4 * ChronoUnit.SECONDS.getDuration().toNanos(); long nanos = 5; assertThat(NanoDuration.durationNanos(6, 7, 1, 2, 3, 4, 5)).isEqualTo(years + months + days + hours + minutes + seconds + nanos); }