package Ġno . nav . person br uk er . dit tn av . metrics . periodic . reporter . health Ċ Ċ import Ġno . nav . person br uk er . dit tn av . metrics . periodic . reporter . metrics . kafka . topic . activity . Activity Level Ċ import Ġno . nav . person br uk er . dit tn av . metrics . periodic . reporter . metrics . kafka . topic . activity . Activity Level .* Ċ import Ġno . nav . person br uk er . dit tn av . metrics . periodic . reporter . metrics . kafka . topic . activity . Activity State Ċ import Ġorg . am sh ove . k lu ent .` should Ġbe Ġequal Ġto ` Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ internal Ġclass ĠActivity Health Dec ider Test Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlow Activity Threshold Ġ= Ġ 1 0 0 ĊĠĠĠ Ġprivate Ġval Ġmod erate Activity Threshold Ġ= Ġ 5 0 ĊĠĠĠ Ġprivate Ġval Ġhigh Activity Th resh Hold Ġ= Ġ 1 0 ĊĊĠĠĠ Ġprivate Ġval Ġdec ider Ġ= ĠActivity Health Dec ider ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlow Activity Threshold , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmod erate Activity Threshold , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhigh Activity Th resh Hold ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` A Ġsufficient ly Ġlow Ġin activity Ġst reak Ġshould Ġnever Ġbe Ġconsidered Ġun healthy `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġst reak Ġ= Ġhigh Activity Th resh Hold Ġ- Ġ 5 ĊĊĠĠĠĠĠĠĠ Ġval Ġlow State Ġ= ĠActivity State ( LOW , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġmod erate State Ġ= ĠActivity State ( MO DER ATE , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġhigh State Ġ= ĠActivity State ( HIGH , Ġst reak ) ĊĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( low State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( mod erate State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( high State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` A Ġsufficient ly Ġhigh Ġin activity Ġst reak Ġshould Ġalways Ġbe Ġconsidered Ġun healthy `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġst reak Ġ= Ġlow Activity Threshold Ġ+ Ġ 5 ĊĊĠĠĠĠĠĠĠ Ġval Ġlow State Ġ= ĠActivity State ( LOW , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġmod erate State Ġ= ĠActivity State ( MO DER ATE , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġhigh State Ġ= ĠActivity State ( HIGH , Ġst reak ) ĊĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( low State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( mod erate State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( high State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` A Ġst reak Ġjust Ġbelow Ġthe Ġmod erate Ġthreshold Ġshould Ġonly Ġbe Ġconsidered Ġun healthy Ġif Ġactivity Ġis Ġhigh `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġst reak Ġ= Ġmod erate Activity Threshold Ġ- Ġ 5 ĊĊĠĠĠĠĠĠĠ Ġval Ġlow State Ġ= ĠActivity State ( LOW , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġmod erate State Ġ= ĠActivity State ( MO DER ATE , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġhigh State Ġ= ĠActivity State ( HIGH , Ġst reak ) ĊĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( low State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( mod erate State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( high State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` A Ġst reak Ġjust Ġabove Ġthe Ġmod erate Ġthreshold Ġshould Ġonly Ġbe Ġconsidered Ġhealthy Ġif Ġactivity Ġis Ġlow `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġst reak Ġ= Ġmod erate Activity Threshold Ġ+ Ġ 5 ĊĊĠĠĠĠĠĠĠ Ġval Ġlow State Ġ= ĠActivity State ( LOW , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġmod erate State Ġ= ĠActivity State ( MO DER ATE , Ġst reak ) ĊĠĠĠĠĠĠĠ Ġval Ġhigh State Ġ= ĠActivity State ( HIGH , Ġst reak ) ĊĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( low State ) Ġ` should Ġbe Ġequal Ġto ` Ġtrue ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( mod erate State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠĠĠĠĠ Ġdec ider . state Is Health y ( high State ) Ġ` should Ġbe Ġequal Ġto ` Ġfalse ĊĠĠĠ Ġ} Ċ Ċ } Ċ