package Ġnet . ko lo ty l uk . loom Ċ Ċ import Ġorg . junit . jupiter . api . Assertions . assertEquals Ċ import Ġorg . junit . jupiter . api . Assertions . assertNot Equals Ċ import Ġorg . junit . jupiter . api . Assertions . assertTrue Ċ Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ import Ġjava . time . Duration Ċ Ċ class ĠL ag Tests K Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġminimum Duration Ġ= ĠDuration . of Millis ( 1 0 ) ĊĠĠĠ Ġprivate Ġval Ġmaximum Duration Ġ= ĠDuration . of Millis ( 2 0 ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġduration Defin ite () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlag Ġ= ĠL ag ( minimum Duration ); ĊĠĠĠĠĠĠĠ Ġval Ġcomputed Duration Ġ= Ġlag . duration ĊĠĠĠĠĠĠĠ ĠassertEquals ( minimum Duration , Ġcomputed Duration ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġduration In defin ite () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlag Ġ= ĠL ag ( minimum Duration , Ġmaximum Duration ); ĊĠĠĠĠĠĠĠ Ġval Ġcomputed Duration Ġ= Ġlag . duration ĊĠĠĠĠĠĠĠ Ġassert Not Equals ( minimum Duration , Ġcomputed Duration ) ĊĠĠĠĠĠĠĠ Ġassert Not Equals ( maximum Duration , Ġcomputed Duration ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( computed Duration . minus ( minimum Duration ). is Positive ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( computed Duration . minus ( maximum Duration ). is Negative ) ĊĠĠĠ Ġ} Ċ }