### Question:
ConfigValue { static String valueToString( Object v ) { if ( v instanceof Duration ) { Duration d = (Duration) v; return String.format( "%dms", d.toMillis() ); } return String.valueOf( v ); } ConfigValue( @Nonnull String name, @Nonnull Optional<String> description,
            @Nonnull Optional<String> documentedDefaultValue, @Nonnull Optional<Object> value,
            @Nonnull String valueDescription, boolean internal, boolean dynamic, boolean deprecated,
            @Nonnull Optional<String> replacement, boolean secret ); @Nonnull String name(); @Nonnull Optional<String> description(); @Nonnull Optional<Object> value(); @Nonnull Optional<String> valueAsString(); @Override String toString(); boolean deprecated(); @Nonnull Optional<String> replacement(); boolean internal(); boolean secret(); boolean dynamic(); @Nonnull Optional<String> documentedDefaultValue(); @Nonnull String valueDescription();  }### Answer:
@Test void durationValueIsRepresentedWithUnit() { assertEquals( "120000ms", valueToString( Duration.ofMinutes( 2 ) ) ); }
@Test void stringValueIsRepresentedAsString() { assertEquals( "bob", valueToString( "bob" ) ); }
@Test void intValueIsRepresentedAsInt() { assertEquals( "7", valueToString( 7 ) ); }
@Test void nullIsHandled() { assertEquals( "null", valueToString( null ) ); }