package Ġcom . github . sh mv anh out en . ad vent of code . day 9 Ċ Ċ import Ġcom . nat pr y ce . ham k rest . assertion . assertThat Ċ import Ġcom . nat pr y ce . ham k rest . equalTo Ċ import Ġorg . junit . Test Ċ Ċ class ĠDe compressor V 2 Tail Recursion Impl Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġgive Ġa Ġlength Ġof Ġ 8 Ġfor Ġ" ABCDEF GH "` () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġde compressor Ġ= ĠDe compressor V 2 Tail Recursion Impl () ĊĠĠĠĠĠĠĠ ĠassertThat ( de compressor . get De compression Size (" ABCDEF GH "), ĠequalTo ( 8 L )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġrepeat ĠA Ġ 2 4 1 9 2 0 Ġtimes Ġfor Ġinput Ġ"( 2 7 x 1 2 )( 2 0 x 1 2 )( 1 3 x 1 4 )( 7 x 1 0 )( 1 x 1 2 ) A "` () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġde compressor Ġ= ĠDe compressor V 2 Tail Recursion Impl () ĊĠĠĠĠĠĠĠ ĠassertThat ( de compressor . get De compression Size ("( 2 7 x 1 2 )( 2 0 x 1 2 )( 1 3 x 1 4 )( 7 x 1 0 )( 1 x 1 2 ) A "), ĠequalTo ( 2 4 1 9 2 0 L )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġde compress Ġa Ġstring Ġ 4 4 5 Ġchars Ġlong Ġfor Ġinput Ġ"( 2 5 x 3 )( 3 x 3 ) ABC ( 2 x 3 ) XY ( 5 x 2 ) PQ RST X ( 1 8 x 9 )( 3 x 2 ) TWO ( 5 x 7 ) SE VEN "` () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġde compressor Ġ= ĠDe compressor V 2 Tail Recursion Impl () ĊĠĠĠĠĠĠĠ ĠassertThat ( de compressor . get De compression Size ("( 2 5 x 3 )( 3 x 3 ) ABC ( 2 x 3 ) XY ( 5 x 2 ) PQ RST X ( 1 8 x 9 )( 3 x 2 ) TWO ( 5 x 7 ) SE VEN "), ĠequalTo ( 4 4 5 L )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġde compress Ġthe Ġfirst Ġpart Ġof Ġthe Ġchallenge Ġinput `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġde compressor Ġ= ĠDe compressor V 2 Tail Recursion Impl () ĊĠĠĠĠĠĠĠ ĠassertThat ( de compressor . get De compression Size ( day 9 Challenge Small er Part ), ĠequalTo ( 1 6 7 9 1 6 4 4 1 L )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġde compress Ġthe Ġchallenge Ġinput `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġde compressor Ġ= ĠDe compressor V 2 Tail Recursion Impl () ĊĠĠĠĠĠĠĠ ĠassertThat ( de compressor . get De compression Size ( day 9 Challenge Input ), ĠequalTo ( 1 1 4 5 1 6 2 8 9 9 5 L )) ĊĠĠĠ Ġ} Ċ }