@Test
public void testNanoConversions()
{

    double nanos = 1.0d;
    Duration duration = new Duration(nanos, NANOSECONDS);
    assertThat(duration.getValue()).isEqualTo(nanos);
    assertThat(duration.getValue(NANOSECONDS)).isEqualTo(nanos);
    assertThat(duration.getValue(MILLISECONDS)).isEqualTo(nanos / 1000000);
    assertThat(duration.getValue(SECONDS)).isEqualTo(nanos / 1000000 / 1000);
    assertThat(duration.getValue(MINUTES)).isCloseTo(nanos / 1000000 / 1000 / 60, offset(1.0E10));
    assertThat(duration.getValue(HOURS)).isCloseTo(nanos / 1000000 / 1000 / 60 / 60, offset(1.0E10));
    assertThat(duration.getValue(DAYS)).isCloseTo(nanos / 1000000 / 1000 / 60 / 60 / 24, offset(1.0E10));
}