package Ġio . ge or ocket . util Ċ Ċ import Ġio . ge or ocket . util . Size Format . format Ċ import Ġorg . junit . Assert Ċ import Ġorg . junit . Test Ċ Ċ /** Ċ Ġ* ĠTest Ġ[ Size Format ] Ċ Ġ* Ġ@ author ĠM ic hel ĠK ra em er Ċ Ġ*/ Ċ class ĠSize Format Test Ġ{ ĊĠ Ġ/** ĊĠĠ Ġ* ĠTest Ġif Ġdata Ġsizes Ġcan Ġbe Ġconverted Ġto Ġhuman - readable Ġstrings ĊĠĠ Ġ*/ ĊĠ Ġ@ Test ĊĠ Ġfun Ġformat () Ġ{ ĊĠĠĠ ĠAssert . assertEquals (" 0 ĠB ", Ġformat (- 1 )) ĊĠĠĠ ĠAssert . assertEquals (" 0 ĠB ", Ġformat ( 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 0 0 ĠB ", Ġformat ( 1 0 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠkB ", Ġformat ( 1 0 0 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠkB ", Ġformat ( 1 0 2 4 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 . 1 ĠkB ", Ġformat (( 1 0 0 0 Ġ+ Ġ 1 0 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 1 . 2 ĠkB ", Ġformat (( 1 0 0 0 Ġ+ Ġ 2 0 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 1 . 3 ĠkB ", Ġformat (( 1 0 0 0 Ġ+ Ġ 2 6 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠMB ", Ġformat (( 1 0 0 0 Ġ* Ġ 1 0 0 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 2 . 5 ĠMB ", Ġformat (( 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 2 Ġ+ Ġ 1 0 0 0 Ġ* Ġ 5 0 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠGB ", Ġformat (( 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 ). to Long ())) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠTB ", Ġformat ( 1 0 0 0 L Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠPB ", Ġformat ( 1 0 0 0 L Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 1 ĠEB ", Ġformat ( 1 0 0 0 L Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 Ġ* Ġ 1 0 0 0 )) ĊĠĠĠ ĠAssert . assertEquals (" 9 . 2 ĠEB ", Ġformat ( Long . MAX _ VALUE )) ĊĠ Ġ} Ċ } Ċ