package Ġcom . tr ansparency . model Ċ Ċ import Ġcom . tr ansparency . features . transport . Feature TO Ċ import Ġcom . tr ansparency . logical . transport . Logical Function TO Ċ import Ġcom . tr ansparency . logical . transport . Logical Signal TO Ċ import Ġorg . junit . BeforeClass Ċ import Ġorg . junit . Test Ċ import Ġjava . util .* Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertFalse Ċ import Ġkotlin . test . assertTrue Ċ Ċ class ĠFeature TO Tests Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġfeature 1 Ġ= ĠFeature TO (" 1 ", Ġ 1 L , Ġ" Feature TO Ġ 1 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġfeature 2 Ġ= ĠFeature TO (" 2 ", Ġ 1 L , Ġ" Feature TO Ġ 2 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġfeature 3 Ġ= ĠFeature TO (" 3 ", Ġ 1 L , Ġ" Feature TO Ġ 3 ") ĊĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 1 Ġ= ĠLogical Function TO ( 1 L , Ġ" Logical ĠFunction Ġ 1 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 2 Ġ= ĠLogical Function TO ( 2 L , Ġ" Logical ĠFunction Ġ 2 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 3 Ġ= ĠLogical Function TO ( 3 L , Ġ" Logical ĠFunction Ġ 3 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 4 Ġ= ĠLogical Function TO ( 4 L , Ġ" Logical ĠFunction Ġ 4 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 5 Ġ= ĠLogical Function TO ( 5 L , Ġ" Logical ĠFunction Ġ 5 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 6 Ġ= ĠLogical Function TO ( 6 L , Ġ" Logical ĠFunction Ġ 6 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Function 7 Ġ= ĠLogical Function TO ( 7 L , Ġ" Logical ĠFunction Ġ 7 ") ĊĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 1 Ġ= ĠLogical Signal TO ( 1 L , Ġ" Logical ĠSignal Ġ 1 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 2 Ġ= ĠLogical Signal TO ( 2 L , Ġ" Logical ĠSignal Ġ 2 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 3 Ġ= ĠLogical Signal TO ( 3 L , Ġ" Logical ĠSignal Ġ 3 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 4 Ġ= ĠLogical Signal TO ( 4 L , Ġ" Logical ĠSignal Ġ 4 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 5 Ġ= ĠLogical Signal TO ( 5 L , Ġ" Logical ĠSignal Ġ 5 ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogical Signal 6 Ġ= ĠLogical Signal TO ( 6 L , Ġ" Logical ĠSignal Ġ 6 ") ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeClass ĊĠĠĠĠĠĠĠ Ġ@ Jvm Static Ġfun Ġsetup Test Architecture () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfeature 1 . add Logical Function ( logical Function 1 , Ġlogical Function 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfeature 2 . add Logical Function ( logical Function 3 , Ġlogical Function 4 , Ġlogical Function 5 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfeature 3 . add Logical Function ( logical Function 5 , Ġlogical Function 6 , Ġlogical Function 7 ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 1 . add Sending Signal ( logical Signal 1 , Ġlogical Signal 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 2 . add Re ceiving Signal ( logical Signal 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 3 . add Sending Signal ( logical Signal 3 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 4 . add Re ceiving Signal ( logical Signal 2 , Ġlogical Signal 4 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 5 . add Re ceiving Signal ( logical Signal 3 , Ġlogical Signal 5 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 5 . add Sending Signal ( logical Signal 4 , Ġlogical Signal 6 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 6 . add Sending Signal ( logical Signal 5 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogical Function 7 . add Re ceiving Signal ( logical Signal 6 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġrecogn izes Dependent Feature () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertTrue ( feature 2 . logic ally Dep ends On ( feature 1 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġrecognize In dependent Features () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertFalse ( feature 1 . logic ally Dep ends On ( feature 2 )) ĊĠĠĠĠĠĠĠ ĠassertFalse ( feature 1 . logic ally Dep ends On ( feature 3 )) ĊĠĠĠĠĠĠĠ ĠassertFalse ( feature 2 . logic ally Dep ends On ( feature 3 )) ĊĠĠĠĠĠĠĠ ĠassertFalse ( feature 3 . logic ally Dep ends On ( feature 1 )) ĊĠĠĠĠĠĠĠ ĠassertFalse ( feature 3 . logic ally Dep ends On ( feature 2 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfinds Correct External Re ceiving Signals () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Signals Ġ= ĠArrays . asList ( logical Signal 2 , Ġlogical Signal 5 ) ĊĠĠĠĠĠĠĠ Ġval Ġactual Signals Ġ= Ġfeature 2 . external Re ceiving Signals () ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Signals . size . to Long (), Ġactual Signals . size . to Long ()) ĊĠĠĠĠĠĠĠ ĠassertTrue ( actual Signals . contains All ( expected Signals )) ĊĠĠĠ Ġ} Ċ }