package Ġcom . bad oo . ri bs . core Ċ Ċ import Ġcom . bad oo . ri bs . core . plugin . View Lifecycle Aware Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ class ĠNode Plugin View Lifecycle Aware Test Ġ: ĠNode Plugin Test () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` View Lifecycle Aware Ġplugins Ġreceive Ġon Attach To View ()` () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġ( node , Ġplugins ) Ġ= Ġtest Plugins < View Lifecycle Aware >() ĊĊĠĠĠĠĠĠĠ Ġnode . onCreate View ( parent View ) ĊĠĠĠĠĠĠĠ Ġnode . on Attach To View () ĊĊĠĠĠĠĠĠĠ Ġplugins . forEach Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( it ). on Attach To View () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` View Lifecycle Aware Ġplugins Ġreceive Ġon Detach From View ()` () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġ( node , Ġplugins ) Ġ= Ġtest Plugins < View Lifecycle Aware >() ĊĊĠĠĠĠĠĠĠ Ġnode . onCreate View ( parent View ) ĊĠĠĠĠĠĠĠ Ġnode . on Attach To View () ĊĠĠĠĠĠĠĠ Ġnode . on Detach From View () ĊĊĠĠĠĠĠĠĠ Ġplugins . forEach Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( it ). on Detach From View () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ