package Ġcom . mapbox . maps . extension . style . utils Ċ Ċ import Ġcom . mapbox . maps . extension . style . types . Prom ote Id Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ Ċ class ĠProm ote Id Test Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ String () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id (" property ") ĊĠĠĠ ĠassertEquals ( expected , ĠProm ote Id . from Property (" property ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ EmptyString () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id ("") ĊĠĠĠ ĠassertEquals ( expected , ĠProm ote Id . from Property ("")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ HashMap () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id (" abc ", Ġ" source ") ĊĠĠĠ Ġval Ġactual Ġ= ĠProm ote Id . from Property ( hash Map Of (" source " Ġto Ġ" abc ")) ĊĠĠĠ ĠassertEquals ( expected , Ġactual ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ Empty HashMap () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id ("") ĊĠĠĠ Ġval Ġactual Ġ= ĠProm ote Id . from Property ( hash Map Of < String , ĠString >()) ĊĠĠĠ ĠassertEquals ( expected , Ġactual ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ Null Source () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id (" abc ", Ġnull ) ĊĠĠĠ ĠassertEquals ( expected , ĠProm ote Id . from Property (" abc ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġfrom Property _ Empty Property And Valid Source () Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= ĠProm ote Id ("", Ġ" source ") ĊĠĠĠ Ġval Ġactual Ġ= ĠProm ote Id . from Property ( hash Map Of (" source " Ġto Ġ"")) ĊĠĠĠ ĠassertEquals ( expected , Ġactual ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ( expected Ġ= ĠUnsupportedOperationException :: class ) ĊĠ Ġfun Ġfrom Property _ Unsupported Type () Ġ{ ĊĠĠĠ ĠProm ote Id . from Property ( int ArrayOf ( 1 , Ġ 2 , Ġ 3 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ( expected Ġ= ĠUnsupportedOperationException :: class ) ĊĠ Ġfun Ġfrom Property _ Unsupported Data ClassType () Ġ{ ĊĠĠĠ ĠProm ote Id . from Property ( Mock Type (" source ", Ġ" abc ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ( expected Ġ= ĠRuntimeException :: class ) ĊĠ Ġfun Ġfrom Property _ Invalid HashMap Type () Ġ{ ĊĠĠĠ ĠProm ote Id . from Property ( hash Map Of ( 1 Ġto Ġ 2 )) ĊĠ Ġ} ĊĊĠ Ġprivate Ġdata Ġclass ĠMock Type ( val Ġa : ĠString , Ġval Ġb : ĠString ) Ċ }