DateHelper { public static org.joda.time.Duration toJodaDuration(final Duration javaDuration) { return org.joda.time.Duration.millis(javaDuration.toMillis()); } private  DateHelper(); @Nullable static Date copy(@Nullable final Date date); @Nullable static DateTime toDateTime(@Nullable final Date date); @Nullable static Date toDate(@Nullable final DateTime dateTime); static DateTime toDateTime(final OffsetDateTime offsetDateTime); static OffsetDateTime toOffsetDateTime(final DateTime dateTime); static Duration toJavaDuration(final org.joda.time.Duration jodaDuration); static org.joda.time.Duration toJodaDuration(final Duration javaDuration);  }
@Test public void toJodaDurationTest() { Duration javaDuration = Duration.ofHours(5); org.joda.time.Duration jodaDuration = org.joda.time.Duration.standardHours(5); assertThat(toJodaDuration(javaDuration), equalTo(jodaDuration)); }