### Question:
TemporalUtil { public static long nanosOfDayToUTC( long nanosOfDayLocal, int offsetSeconds ) { return nanosOfDayLocal - offsetSeconds * NANOS_PER_SECOND; } private  TemporalUtil(); static OffsetTime truncateOffsetToMinutes( OffsetTime value ); static long nanosOfDayToUTC( long nanosOfDayLocal, int offsetSeconds ); static long nanosOfDayToLocal( long nanosOfDayUTC, int offsetSeconds ); static long getNanosOfDayUTC( OffsetTime value ); static final long NANOS_PER_SECOND; static final long AVG_NANOS_PER_MONTH; static final long SECONDS_PER_DAY; static final long AVG_SECONDS_PER_MONTH; static final double AVG_DAYS_PER_MONTH; }### Answer:
@Test void shouldConvertNanosOfDayToUTCWhenOffsetIsZero() { int nanosOfDayLocal = 42; long nanosOfDayUTC = TemporalUtil.nanosOfDayToUTC( nanosOfDayLocal, 0 ); assertEquals( nanosOfDayLocal, nanosOfDayUTC ); }
@Test void shouldConvertNanosOfDayToUTC() { int nanosOfDayLocal = 42; Duration offsetDuration = Duration.ofMinutes( 35 ); long nanosOfDayUTC = TemporalUtil.nanosOfDayToUTC( nanosOfDayLocal, (int) offsetDuration.getSeconds() ); assertEquals( nanosOfDayLocal - offsetDuration.toNanos(), nanosOfDayUTC ); }