package Ġde . th omas let sch Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . Test Ċ Ċ internal Ġclass ĠTransport Container Kt Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġto ByteArray Login Package () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġ" 0 0 0 0 0 0 0 0 0 0 0 0 5 4 1 0 EC 0 3 6 1 5 0 0 0 1 9 0 0 0 0 0 0 0 0 0 0 1 0 0 6 7 4 6 8 6 F 6 D 6 1 7 3 6 1 6 1 6 1 6 2 6 2 6 2 6 3 6 3 6 3 2 DF 0 " ĊĠĠĠĠĠĠĠ Ġval Ġtc Ġ= ĠTransport Container ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 0 0 0 0 0 0 0 0 0 0 0 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 5 4 1 0 EC 0 3 6 1 5 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPackage ( command Ġ= ĠCommand . LOGIN , Ġpayload Ġ= ĠPayload . login (" th omas ", Ġ" aa ab bb ccc ")) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠassertThat ( tc . toByteArray (). to HexString ()). isEqualTo ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfrom ByteArray Empty () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtc Ġ= ĠTransport Container . from (" 5 4 1 0 EC 0 3 6 1 5 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 1 8 0 0 ". to Hex ByteArray ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( tc ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( tc . sender ). isEqualTo (" 5 4 1 0 EC 0 3 6 1 5 0 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( tc . receiver ). isEqualTo (" 0 0 0 0 0 0 0 0 0 0 0 6 ") ĊĠĠĠĠĠĠĠ Ġval Ġpack Ġ= Ġtc . pack ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . tag ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . token ). isEqualTo (" 0 0 0 0 0 0 0 0 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . command ). isEqualTo ( Command . EMPTY ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfrom ByteArray Login Response () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtc Ġ= ĠTransport Container . from (" 5 4 1 0 EC 0 3 6 1 5 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 1 8 0 0 ". to Hex ByteArray ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( tc ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( tc . sender ). isEqualTo (" 5 4 1 0 EC 0 3 6 1 5 0 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( tc . receiver ). isEqualTo (" 0 0 0 0 0 0 0 0 0 0 0 6 ") ĊĠĠĠĠĠĠĠ Ġval Ġpack Ġ= Ġtc . pack ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . tag ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . token ). isEqualTo (" 0 0 0 0 0 0 0 0 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( pack . command ). isEqualTo ( Command . EMPTY ) ĊĠĠĠ Ġ} Ċ } Ċ