package Ġcom . coin ninja . coin keeper . cn . wallet Ċ Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . Test Ċ Ċ class ĠWallet Flags Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 4 9 _ version 0 _ active () Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 4 9 , ĠWallet Flags . v 0 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 4 9 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 4 9 _ version 1 _ active () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 4 9 , ĠWallet Flags . v 1 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 4 9 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 4 9 _ version 2 _ active () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 4 9 , ĠWallet Flags . v 2 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 4 9 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 8 4 _ version 0 _ active () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 8 4 , ĠWallet Flags . v 0 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 1 6 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 8 4 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 8 4 _ version 1 _ active () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 8 4 , ĠWallet Flags . v 1 ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 1 7 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 8 4 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġpurpose 8 4 _ version 2 _ active () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 8 4 , ĠWallet Flags . v 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 1 8 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 8 4 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġnot _ active _ version _ 0 _ purpose _ 4 9 () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflags Ġ= ĠWallet Flags . compose ( Wallet Flags . purpose 8 4 , ĠWallet Flags . v 2 , Ġfalse ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . flag ). isEqualTo ( 2 7 4 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . version Bit ). isEqualTo ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . purpose Bit ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . isActive ()). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 0 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 1 )). isFalse () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Version ( Wallet Flags . v 2 )). isTrue () ĊĠĠĠĠĠĠĠ ĠassertThat ( flags . has Purpose ( Wallet Flags . purpose 8 4 )). isTrue () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġgetter _ for _ purpose 4 9 _ version 1 () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( Wallet Flags . purpose 4 9 v 1 ). isEqualTo ( 1 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġgetter _ for _ purpose 4 9 _ version 1 _ disabled () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( Wallet Flags . purpose 4 9 v 1 Disabled ). isEqualTo ( 2 5 7 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġgetter _ for _ purpose 8 4 _ version 2 () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( Wallet Flags . purpose 8 4 v 2 ). isEqualTo ( 1 8 ) ĊĠĠĠ Ġ} Ċ } Ċ