/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 1 6 - 2 0 1 9 ĠThe Ġlg ou 2 w Ġ< lg ou 2 w @ hotmail . com > Ċ Ġ* Ċ Ġ* ĠLicensed Ġ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 Ġcom . lg ou 2 w . ld k . nbt Ċ Ċ import Ġorg . am sh ove . k lu ent . inv oking Ċ import Ġorg . am sh ove . k lu ent . should Contain Ċ import Ġorg . am sh ove . k lu ent . should Equal Ċ import Ġorg . am sh ove . k lu ent . should Not Be Ċ import Ġorg . am sh ove . k lu ent . should Throw Ċ import Ġorg . am sh ove . k lu ent . with Cause Ċ import Ġorg . junit . Test Ċ import Ġjava . io . Data Input Ċ import Ġjava . io . Data Output Ċ import Ġjava . lang . reflect . Invocation TargetException Ċ Ċ class ĠN BT Tag Compound Test Ġ{ ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget Ġ- Ġvalidation `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . put Byte (" b ", Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . put Byte (" b ", Ġ 1 . to Byte ()) ĊĠĠĠĠĠĠĠ Ġcompound . put Boolean (" b ", Ġfalse ) ĊĠĠĠĠĠĠĠ Ġcompound . put Boolean (" b ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġcompound . put Short (" s ", Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . put Short (" s ", Ġ 1 . to Short ()) ĊĠĠĠĠĠĠĠ Ġcompound . put Int (" i ", Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . put Long (" l ", Ġ 1 L ) ĊĠĠĠĠĠĠĠ Ġcompound . put Float (" f ", Ġ 1 f ) ĊĠĠĠĠĠĠĠ Ġcompound . put Double (" d ", Ġ 1 . 0 ) ĊĠĠĠĠĠĠĠ Ġcompound . put ByteArray ("[ b ", Ġbyte ArrayOf ( 1 )) ĊĠĠĠĠĠĠĠ Ġcompound . putString (" string ", Ġ" 1 ") ĊĠĠĠĠĠĠĠ Ġcompound . put ( of List (" list ")) ĊĠĠĠĠĠĠĠ Ġcompound . put ( of Compound (" compound ")) ĊĠĠĠĠĠĠĠ Ġcompound . put IntArray ("[ i ", Ġint ArrayOf ( 1 )) ĊĠĠĠĠĠĠĠ Ġcompound . put Long Array ("[ l ", Ġlong ArrayOf ( 1 L )) ĊĠĠĠĠĠĠĠ Ġcompound . size Ġshould Equal Ġ 1 2 ĊĠĠĠĠĠĠĠ Ġcompound . getByte (" b ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean (" b ") Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . get Short (" s ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getInt (" i ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getLong (" l ") Ġshould Equal Ġ 1 L ĊĠĠĠĠĠĠĠ Ġcompound . get Float (" f ") Ġshould Equal Ġ 1 f ĊĠĠĠĠĠĠĠ Ġcompound . getDouble (" d ") Ġshould Equal Ġ 1 . 0 ĊĠĠĠĠĠĠĠ Ġcompound . get ByteArray ("[ b ") Ġshould Contain Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getString (" string ") Ġshould Equal Ġ" 1 " ĊĠĠĠĠĠĠĠ Ġcompound . getList (" list ") Ġshould Equal Ġof List (" list ") ĊĠĠĠĠĠĠĠ Ġcompound . get Compound (" compound ") Ġshould Equal Ġof Compound (" compound ") ĊĠĠĠĠĠĠĠ Ġcompound . getInt Array ("[ i ") Ġshould Contain Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getLong Array ("[ l ") Ġshould Contain Ġ 1 L ĊĠĠĠĠĠĠĠ Ġcompound . getByte OrNull (" bb ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getByte OrNull (" b ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean OrNull (" bb ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean OrNull (" b ") Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . get Short OrNull (" ss ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . get Short OrNull (" s ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getInt OrNull (" ii ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getInt OrNull (" i ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . getLong OrNull (" ll ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getLong OrNull (" l ") Ġshould Equal Ġ 1 L ĊĠĠĠĠĠĠĠ Ġcompound . get Float OrNull (" ff ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . get Float OrNull (" f ") Ġshould Equal Ġ 1 f ĊĠĠĠĠĠĠĠ Ġcompound . getDouble OrNull (" dd ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getDouble OrNull (" d ") Ġshould Equal Ġ 1 . 0 ĊĠĠĠĠĠĠĠ Ġcompound . get ByteArray OrNull ("[ bb ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . get ByteArray OrNull ("[ b ") ?. should Contain ( 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . getString OrNull (" s string ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getString OrNull (" string ") Ġshould Equal Ġ" 1 " ĊĠĠĠĠĠĠĠ Ġcompound . getList OrNull (" l list ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getList OrNull (" list ") Ġshould Equal Ġof List (" list ") ĊĠĠĠĠĠĠĠ Ġcompound . get Compound OrNull (" c compound ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . get Compound OrNull (" compound ") Ġshould Equal Ġof Compound (" compound ") ĊĠĠĠĠĠĠĠ Ġcompound . getInt Array OrNull ("[ ii ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getInt Array OrNull ("[ i ") ?. should Contain ( 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . getLong Array OrNull ("[ ll ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . getLong Array OrNull ("[ l ") ?. should Contain ( 1 L ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget OrDefault Ġ- Ġvalidation `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . getByte OrDefault (" b ") Ġshould Equal Ġ 0 ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean OrDefault (" b ") Ġshould Equal Ġfalse ĊĠĠĠĠĠĠĠ Ġcompound . get Short OrDefault (" s ") Ġshould Equal Ġ 0 ĊĠĠĠĠĠĠĠ Ġcompound . getInt OrDefault (" i ") Ġshould Equal Ġ 0 ĊĠĠĠĠĠĠĠ Ġcompound . getLong OrDefault (" l ") Ġshould Equal Ġ 0 L ĊĠĠĠĠĠĠĠ Ġcompound . get Float OrDefault (" f ") Ġshould Equal Ġ 0 f ĊĠĠĠĠĠĠĠ Ġcompound . getDouble OrDefault (" d ") Ġshould Equal Ġ 0 . 0 ĊĠĠĠĠĠĠĠ Ġcompound . get ByteArray OrDefault ("[ b "). isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . getString OrDefault (" string ") Ġshould Equal Ġ"" ĊĠĠĠĠĠĠĠ Ġcompound . getList OrDefault (" list "). isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . get Compound OrDefault (" compound "). isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . getInt Array OrDefault ("[ i "). isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . getLong Array OrDefault ("[ l "). isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . put Boolean (" b 2 ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean (" b ") Ġshould Equal Ġfalse ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean OrNull (" b ") Ġshould Equal Ġfalse ĊĠĠĠĠĠĠĠ Ġcompound . getBoolean OrDefault (" b 2 ") Ġshould Equal Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġmethod Ġvalidation Ġfrom Ġsome Ġmap `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġentry Value 1 = ĠN BT Tag String ( value Ġ= Ġ" value ") ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . value Ġ= Ġhash Map Of (" key " Ġto Ġentry Value 1 ) ĊĠĠĠĠĠĠĠ Ġcompound . contains Value ( entry Value 1 ) Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . keys Ġshould Contain Ġ" key " ĊĠĠĠĠĠĠĠ Ġcompound . values Ġshould Contain Ġentry Value 1 ĊĠĠĠĠĠĠĠ Ġcompound . value . size Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġcompound . containsKey (" key ") Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound [" key "] Ġshould Equal Ġentry Value 1 ĊĠĠĠĠĠĠĠ Ġcompound . remove (" key ", Ġentry Value 1 ) Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . clear () ĊĠĠĠĠĠĠĠ Ġcompound . isEmpty () Ġshould Equal Ġtrue ĊĠĠĠĠĠĠĠ Ġcompound . equals ( null ) Ġshould Equal Ġfalse ĊĠĠĠĠĠĠĠ Ġcompound . put All ( map Of (" key " Ġto Ġentry Value 1 )) ĊĠĠĠĠĠĠĠ Ġval Ġcompound Cl oned Ġ= Ġcompound . clone () ĊĠĠĠĠĠĠĠ Ġcompound Ġshould Equal Ġcompound Cl oned ĊĠĠĠĠĠĠĠ Ġcompound Ġshould Not Be Ġcompound Cl oned ĊĠĠĠĠĠĠĠ Ġcompound . clear () ĊĠĠĠĠĠĠĠ Ġcompound . equals ( compound Cl oned ) Ġshould Equal Ġfalse ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget Ġ- ĠIf Ġthe Ġentry Ġdoes Ġnot Ġexist , Ġshould Ġbe Ġthrow Ġexception `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġinvoking Ġ{ Ġcompound . getInt (" int ") Ġ} Ġshould Throw ĠNoSuch ElementException :: class ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget Ġ- ĠIf Ġthe Ġentry Ġtype Ġnot Ġmatch , Ġshould Ġbe Ġthrow Ġexception `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġput Int (" int ", Ġ 1 ) Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . getInt (" int ") Ġshould Equal Ġ 1 ĊĠĠĠĠĠĠĠ Ġinvoking Ġ{ Ġcompound . getString (" int ") Ġ} Ġshould Throw ĠClass CastException :: class ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- ĠtoJson `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġempty Compound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġput Byte (" byte ", Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġput String (" str ", Ġ" value ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . toJson () Ġshould Equal Ġ"{\" byte \": 1 ,\" str \":\" value \" }" ĊĠĠĠĠĠĠĠ Ġcompound . to Mo j ang son () Ġshould Equal Ġ"{\" byte \": 1 b ,\" str \":\" value \" }" ĊĠĠĠĠĠĠĠ Ġcompound . to Mo j ang son With Color () Ġshould Equal Ġ"{ Â§ b byte Â§ r : ĠÂ§ 6 1 Â§ cb Â§ r , ĠÂ§ b str Â§ r : Ġ\" Â§ av alue Â§ r \" }" ĊĠĠĠĠĠĠĠ Ġempty Compound . toJson () Ġshould Equal Ġ"{} " ĊĠĠĠĠĠĠĠ Ġempty Compound . to Mo j ang son () Ġshould Equal Ġ"{} " ĊĠĠĠĠĠĠĠ Ġempty Compound . to Mo j ang son With Color () Ġshould Equal Ġ"{} " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġlookup Ġ- ĠIf Ġthe Ġpath Ġis Ġnull Ġor Ġblank , Ġshould Ġreturn Ġnull `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ Ġ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . lookup ( null ) Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup ("") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < String >( null ) Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < String >(" ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup (" abc ") Ġshould Equal Ġnull ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġlookup `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcompound Ġ= Ġof Compound Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġput ( of Compound (" data ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput String (" id ", Ġ" di amond ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput ( of List (" flags ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġadd Byte ( 0 , Ġ 1 , Ġ 3 , Ġ 6 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput Int (" counts ", Ġ 1 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġcompound . lookup (" dt ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup (" dt . id ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup (" data ") ?. type Ġshould Equal ĠN BT Type . TAG _ COMP O UND ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < String >(" data . id ") Ġshould Equal Ġ" di amond " ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < Byte >(" data . flags [ 2 ]") Ġshould Equal Ġ 3 ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < NBT Tag List >(" data . flags ") ?. elementType Ġshould Equal ĠN BT Type . TAG _ BYTE ĊĠĠĠĠĠĠĠ Ġcompound . lookup Value < String >(" data . 4 0 4 Ġnot Ġfound ") Ġshould Equal Ġnull ĊĠĠĠĠĠĠĠ Ġcompound . lookup (" data . counts [ 0 ]") Ġshould Equal Ġnull Ġ// Ġshould ĠTAG _ INT ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget OrDefault Ġ- ĠTAG _ END Ġshould Ġbe Ġthrow Ġexception `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġget OrDefault Method Ġ= ĠN BT Tag Compound :: class . java ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. getDeclared Method (" get OrDefault ", ĠN BT Type :: class . java , ĠString :: class . java ) Ġ?: Ġreturn ĊĠĠĠĠĠĠĠ Ġget OrDefault Method . is Accessible Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġinvoking Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget OrDefault Method . invoke ( of Compound Ġ{ Ġ}, ĠN BT Type . TAG _ END , Ġ" END ") ĊĠĠĠĠĠĠĠ Ġ} Ġshould Throw ĠInvocation TargetException :: class Ġwith Cause ĠUnsupportedOperationException :: class ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġclass ĠMy NBT Ġ: ĠN BT Base < Any >(" my ", ĠAny ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠtoString (): ĠString Ġ= Ġthrow ĠUnsupportedOperationException () ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġclone (): ĠN BT Base < *> Ġ= Ġthrow ĠUnsupportedOperationException () ĊĠĠĠĠĠĠĠ Ġoverride Ġval Ġtype Ġ: ĠN BT Type Ġget () Ġ= Ġthrow ĠUnsupportedOperationException () ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġread ( input : ĠData Input ) Ġ{ Ġ} ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġwrite ( output : ĠData Output ) Ġ{ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` NBT Tag Compound Ġ- Ġget And Check Ġ- ĠExpected Ġtype Ġmismatch , Ġshould Ġthrow Ġexception `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġget And Check Method Ġ= ĠN BT Tag Compound :: class . java ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. getDeclared Method (" get And Check ", ĠString :: class . java , ĠClass :: class . java , ĠBoolean :: class . java ) Ġ?: Ġreturn ĊĠĠĠĠĠĠĠ Ġget And Check Method . is Accessible Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġinvoking Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget And Check Method . invoke ( of Compound Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput Int (" 4 0 4 ", Ġ 1 ) Ġ// ĠTAG _ INT ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}, Ġ" 4 0 4 ", ĠMy NBT :: class . java , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġ} Ġshould Throw ĠInvocation TargetException :: class Ġwith Cause ĠClass CastException :: class ĊĠĠĠ Ġ} Ċ } Ċ