package Ġdev . st alla . parser . namespace Ċ Ċ import Ġassert k . assertThat Ċ import Ġassert k . assertions . isEqualTo Ċ import Ġassert k . assertions . isNull Ċ import Ġassert k . assertions . prop Ċ import Ġdev . st alla . builder . fake . episode . Fake Episode Bit love Builder Ċ import Ġdev . st alla . builder . fake . episode . Fake Episode Builder Ċ import Ġdev . st alla . dom . Xml Res Ċ import Ġdev . st alla . parser . Namespace Parser Test Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . w 3 c . dom . Node Ċ Ċ internal Ġclass ĠBit love Parser Test Ġ: ĠNamespace Parser Test () Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġparser Ġ= ĠBit love Parser ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` should Ġextract Ġthe ĠBit love Ġguid Ġattribute Ġfrom Ġen closure Ġnodes Ġwhen Ġit 's Ġpresent `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnode : ĠNode Ġ= ĠXml Res ("/ xml / item . xml "). root Node ByName (" item ") ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠFake Episode Builder () ĊĠĠĠĠĠĠĠ Ġnode . parse Item Child Nodes ( builder ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( builder . bit love Builder , Ġ" item . bit love ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. prop ( Fake Episode Bit love Builder :: guid ). isEqualTo (" episode Ġbit love Ġguid ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` should Ġnot Ġextract Ġthe ĠBit love Ġguid Ġattribute Ġfrom Ġen closure Ġnodes Ġwhen Ġit 's Ġabsent `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnode : ĠNode Ġ= ĠXml Res ("/ xml / item - in complete . xml "). root Node ByName (" item ") ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠFake Episode Builder () ĊĠĠĠĠĠĠĠ Ġnode . parse Item Child Nodes ( builder ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( builder . bit love Builder , Ġ" item . bit love ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. prop ( Fake Episode Bit love Builder :: guid ). isNull () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` should Ġextract Ġnothing Ġfrom Ġitem Ġwhen ĠBit love Ġdata Ġis Ġall Ġempty `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġchannel : ĠNode Ġ= ĠXml Res ("/ xml / rss - all - empty . xml "). node By XPath ("/ rss / channel / item ") ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠFake Episode Builder () ĊĠĠĠĠĠĠĠ Ġchannel . parse Item Child Nodes ( builder ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( builder . bit love Builder , Ġ" item . bit love ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. prop ( Fake Episode Bit love Builder :: guid ). isNull () ĊĠĠĠ Ġ} Ċ } Ċ