/* Ċ Ġ* Ġ ĠLicensed Ġto Ġthe ĠApache ĠSoftware ĠFoundation Ġ( ASF ) Ġunder Ġone Ċ Ġ* Ġ Ġor Ġmore Ġcontributor Ġlicense Ġagreements . Ġ ĠSee Ġthe ĠNOTICE Ġfile Ċ Ġ* Ġ Ġdistributed Ġwith Ġthis Ġwork Ġfor Ġadditional Ġinformation Ċ Ġ* Ġ Ġregarding Ġcopyright Ġownership . Ġ ĠThe ĠASF Ġlicenses Ġthis Ġfile Ċ Ġ* Ġ Ġto Ġyou Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ċ Ġ* Ġ Ġ" License "); Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ċ Ġ* Ġ Ġwith Ġthe ĠLicense . Ġ ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* Ġ ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġ Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* Ġ ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* Ġ ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġ Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġorg . apache . beam . learning . kat as . core transforms . co groupby key Ċ Ċ import Ġorg . apache . beam . learning . kat as . core transforms . co groupby key . Task . apply Transform Ċ import Ġorg . apache . beam . sdk . testing . P Assert Ċ import Ġorg . apache . beam . sdk . testing . Test Pipeline Ċ import Ġorg . apache . beam . sdk . transforms . Create Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ class ĠTask Test Ġ{ ĊĠ Ġ@ get : Rule ĊĠ Ġ@ Transient ĊĠ Ġval Ġtest Pipeline : ĠTest Pipeline Ġ= ĠTest Pipeline . create () ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcore _ transforms _ co groupby key _ co groupby key () Ġ{ ĊĠĠĠ Ġval Ġfru its Ġ= Ġtest Pipeline . apply ( ĊĠĠĠĠĠ Ġ" F ru its ", ĊĠĠĠĠĠ ĠCreate . of (" apple ", Ġ" ban ana ", Ġ" ch erry ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġcountries Ġ= Ġtest Pipeline . apply ( ĊĠĠĠĠĠ Ġ" Countries ", ĊĠĠĠĠĠ ĠCreate . of (" au str alia ", Ġ" braz il ", Ġ" can ada ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġresults Ġ= Ġapply Transform ( fr uits , Ġcountries ) ĊĊĠĠĠ ĠP Assert . that ( results ). contains In Any Order ( ĊĠĠĠĠĠ Ġ" Words Alphabet { alphabet =' a ', Ġfruit =' apple ', Ġcountry =' au str alia '} ", ĊĠĠĠĠĠ Ġ" Words Alphabet { alphabet =' b ', Ġfruit =' ban ana ', Ġcountry =' braz il '} ", ĊĠĠĠĠĠ Ġ" Words Alphabet { alphabet =' c ', Ġfruit =' ch erry ', Ġcountry =' can ada ' }" ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġtest Pipeline . run (). wait Until Finish () ĊĠ Ġ} Ċ }