### Question:
TimeMapper { public LocalTime mapTime(OffsetDateTime time) { if (time == null) { return null; } return time.toLocalTime(); }  LocalTime mapTime(OffsetDateTime time);  }### Answer:
@Test void mapTime() { TimeMapper mapper = new TimeMapper(); LocalTime result = mapper.mapTime(OffsetDateTime.of(2020, 1, 1, 1, 1, 1, 1, ZoneOffset.UTC)); assertEquals(LocalTime.of(1, 1, 1, 1), result); }
@Test void mapTime_null_time() { TimeMapper mapper = new TimeMapper(); LocalTime result = mapper.mapTime(null); assertNull(result); }