### Question:
TimeToChronoUnitConverter { public static ChronoUnit of(TimeUnit unit) { return Optional.ofNullable(TIME_UNIT_TO_CHRONO_UNIT.get(unit)) .orElseThrow(() -> new IllegalArgumentException("Unsupported TimeUnit.")); } private  TimeToChronoUnitConverter(); static ChronoUnit of(TimeUnit unit);  }### Answer:
@Test public void shouldReturnCorrectChronoUnit() { SoftAssertions assertions = new SoftAssertions(); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.MICROSECONDS)).isEqualTo(ChronoUnit.MICROS); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.NANOSECONDS)).isEqualTo(ChronoUnit.NANOS); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.MILLISECONDS)).isEqualTo(ChronoUnit.MILLIS); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.SECONDS)).isEqualTo(ChronoUnit.SECONDS); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.MINUTES)).isEqualTo(ChronoUnit.MINUTES); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.HOURS)).isEqualTo(ChronoUnit.HOURS); assertions.assertThat(TimeToChronoUnitConverter.of(TimeUnit.DAYS)).isEqualTo(ChronoUnit.DAYS); assertions.assertAll(); }