@Test
void testGetPeriod() {

    final Instant now = Instant.now().truncatedTo(ChronoUnit.MILLIS);
    final Instant future = now.plus(2, ChronoUnit.DAYS);
    final TimePeriod period = TimePeriod.between(now, future);
    assertThat(now).isEqualTo(period.getFrom());
    assertThat(future).isEqualTo(period.getTo());
    assertThat(period.getPeriod()).isEqualTo(Period.ofDays(2));
}