### Question:
TimeUtil { @Deprecated public static String nanosToString( long nanos ) { assert nanos >= 0; long nanoSeconds = nanos; StringBuilder timeString = new StringBuilder(); long days = DAYS.convert( nanoSeconds, NANOSECONDS ); if ( days > 0 ) { nanoSeconds -= DAYS.toNanos( days ); timeString.append( days ).append( 'd' ); } long hours = HOURS.convert( nanoSeconds, NANOSECONDS ); if ( hours > 0 ) { nanoSeconds -= HOURS.toNanos( hours ); timeString.append( hours ).append( 'h' ); } long minutes = MINUTES.convert( nanoSeconds, NANOSECONDS ); if ( minutes > 0 ) { nanoSeconds -= MINUTES.toNanos( minutes ); timeString.append( minutes ).append( 'm' ); } long seconds = SECONDS.convert( nanoSeconds, NANOSECONDS ); if ( seconds > 0 ) { nanoSeconds -= SECONDS.toNanos( seconds ); timeString.append( seconds ).append( 's' ); } long milliseconds = MILLISECONDS.convert( nanoSeconds, NANOSECONDS ); if ( milliseconds > 0 ) { nanoSeconds -= MILLISECONDS.toNanos( milliseconds ); timeString.append( milliseconds ).append( "ms" ); } long microseconds = MICROSECONDS.convert( nanoSeconds, NANOSECONDS ); if ( microseconds > 0 ) { nanoSeconds -= MICROSECONDS.toNanos( microseconds ); timeString.append( microseconds ).append( "μs" ); } if ( nanoSeconds > 0 || timeString.length() == 0 ) { timeString.append( nanoSeconds ).append( "ns" ); } return timeString.toString(); } private  TimeUtil(); @Deprecated static String nanosToString( long nanos ); @Deprecated
    static final TimeUnit DEFAULT_TIME_UNIT; @Deprecated
    static final String VALID_TIME_DESCRIPTION; @Deprecated
    static final Function<String,Long> parseTimeMillis; }### Answer:
@Test void formatNanosToString() { assertEquals( "1ns", nanosToString( 1 ) ); assertEquals( "10ns", nanosToString( 10 ) ); assertEquals( "100ns", nanosToString( 100 ) ); assertEquals( "1μs", nanosToString( 1000 ) ); assertEquals( "10μs100ns", nanosToString( 10100 ) ); assertEquals( "101μs10ns", nanosToString( 101010 ) ); assertEquals( "10ms101μs10ns", nanosToString( 10101010 ) ); assertEquals( "1s20ms304μs50ns", nanosToString( 1020304050 ) ); assertEquals( "1m42s30ms405μs60ns", nanosToString( 102030405060L ) ); assertEquals( "2h50m3s40ms506μs70ns", nanosToString( 10203040506070L ) ); assertEquals( "11d19h25m4s50ms607μs80ns", nanosToString( 1020304050607080L ) ); }