### Question:
DurationValue extends ScalarValue implements TemporalAmount, Comparable<DurationValue> { public static DurationValue duration( Duration value ) { requireNonNull( value, "Duration" ); return newDuration( 0, 0, value.getSeconds(), value.getNano() ); } private  DurationValue( long months, long days, long seconds, long nanos ); static DurationValue duration( Duration value ); static DurationValue duration( Period value ); static DurationValue duration( long months, long days, long seconds, long nanos ); static DurationValue parse( CharSequence text ); static DurationValue parse( TextValue text ); static DurationValue build( MapValue map ); static DurationValue between( TemporalUnit unit, Temporal from, Temporal to ); @Override int compareTo( DurationValue other ); @Override boolean equals( Value other ); @Override void writeTo( ValueWriter<E> writer ); @Override TemporalAmount asObjectCopy(); @Override String toString(); @Override String getTypeName(); @Override String prettyPrint(); @Override ValueGroup valueGroup(); @Override NumberType numberType(); @Override long updateHash( HashFunction hashFunction, long hash ); @Override T map( ValueMapper<T> mapper ); @Override long get( TemporalUnit unit ); LongValue get( String fieldName ); @Override List<TemporalUnit> getUnits(); DurationValue plus( long amount, TemporalUnit unit ); @Override Temporal addTo( Temporal temporal ); @Override Temporal subtractFrom( Temporal temporal ); DurationValue add( DurationValue that ); DurationValue sub( DurationValue that ); DurationValue mul( NumberValue number ); DurationValue div( NumberValue number ); static DurationValue approximate( double months, double days, double seconds, double nanos ); static final DurationValue MIN_VALUE; static final DurationValue MAX_VALUE; static final DurationValue ZERO; }### Answer:
@Test void shouldEqualItself() { assertEqual( duration( 40, 3, 13, 37 ), duration( 40, 3, 13, 37 ) ); assertEqual( duration( 40, 3, 14, 37 ), duration( 40, 3, 13, 1_000_000_037 ) ); }
@Test void shouldNotEqualOther() { assertNotEqual( duration( 40, 3, 13, 37 ), duration( 40, 3, 14, 37 ) ); assertNotEqual( duration( 1, 0, 0, 0 ), duration( 0, 0, 2_629_800, 0 ) ); assertNotEqual( duration( 0, 1, 0, 0 ), duration( 0, 0, 60 * 60 * 24, 0 ) ); assertNotEqual( duration( 400 * 12, 0, 0, 0 ), duration( 0, 146_097, 0, 0 ) ); }
@Test void shouldNotThrowWhenInsideOverflowLimit() { duration( 0, 0, Long.MAX_VALUE, 999_999_999 ); }
@Test void shouldNotThrowWhenInsideNegativeOverflowLimit() { duration( 0, 0, Long.MIN_VALUE, -999_999_999 ); }