package Ġio . horizontal systems . hd wallet kit Ċ Ċ import Ġorg . junit . Assert Ċ import Ġorg . junit . Test Ċ Ċ class ĠHD Key chain Test Ġ{ ĊĊĠĠĠ Ġval Ġseed Ġ= Ġ" 6 9 0 8 6 3 0 f 5 6 4 bd 3 ca 9 efb 5 2 1 e 7 2 da 8 6 7 2 7 fc 7 8 2 8 5 b 1 5 de ced b 4 4 f 4 0 b 0 2 4 7 4 5 0 2 ed 6 8 4 4 9 5 8 b 2 9 4 6 5 2 4 6 a 6 1 8 b 1 b 5 6 b 4 bd ff acd 1 de 8 b 3 2 4 1 5 9 e 0 f 7 f 5 9 4 c 6 1 1 b 0 5 1 9 d ". hex StringTo ByteArray () ĊĠĠĠ Ġval Ġhd Key Manager Ġ= ĠHD Key chain ( seed ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠgetKey By Path _ B ip 3 2 () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath 3 2 Ġ= Ġ" m / 0 " ĊĠĠĠĠĠĠĠ Ġval Ġhd Key Ġ= Ġhd Key Manager . getKey By Path ( path 3 2 ) ĊĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( path 3 2 , Ġhd Key . toString ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠgetKey By Path _ B ip 4 4 () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath 4 4 Ġ= Ġ" m / 4 4 '/ 0 '/ 0 '/ 0 " ĊĠĠĠĠĠĠĠ Ġval Ġhd Key Ġ= Ġhd Key Manager . getKey By Path ( path 4 4 ) ĊĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( path 4 4 , Ġhd Key . toString ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠNumber FormatException :: class ) ĊĠĠĠ Ġ@ Throws ( Exception :: class ) ĊĠĠĠ Ġfun Ġget PrivateKey By Path _ invalid Path () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath 3 2 Ġ= Ġ" m / 0 / b " ĊĠĠĠĠĠĠĠ Ġhd Key Manager . getKey By Path ( path 3 2 ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ