HashMap Test Program #1 The exact order of your map may differ from the expected output, but you should have the same overall collection of key/value pairs. The Output Comparison Tool's "Ignore order of chars" option will help you compare your output. test put(): after putting 42, map = {42=boo42}, size = 1 debug() output: index data 0 null 1 null 2 42=boo42 3 null 4 null 5 null 6 null 7 null 8 null 9 null size 1 after putting 29, map = {42=boo42, 29=boo29}, size = 2 debug() output: index data 0 null 1 null 2 42=boo42 3 null 4 null 5 null 6 null 7 null 8 null 9 29=boo29 size 2 after putting 42, map = {42=boo42, 29=boo29}, size = 2 debug() output: index data 0 null 1 null 2 42=boo42 3 null 4 null 5 null 6 null 7 null 8 null 9 29=boo29 size 2 after putting 17, map = {42=boo42, 17=boo17, 29=boo29}, size = 3 debug() output: index data 0 null 1 null 2 42=boo42 3 null 4 null 5 null 6 null 7 17=boo17 8 null 9 29=boo29 size 3 after putting 112, map = {112=boo112, 42=boo42, 17=boo17, 29=boo29}, size = 4 debug() output: index data 0 null 1 null 2 112=boo112 --> 42=boo42 3 null 4 null 5 null 6 null 7 17=boo17 8 null 9 29=boo29 size 4 after putting -9, map = {112=boo112, 42=boo42, 17=boo17, -9=boo-9, 29=boo29}, size = 5 debug() output: index data 0 null 1 null 2 112=boo112 --> 42=boo42 3 null 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 5 after putting 17, map = {112=boo112, 42=boo42, 17=boo17, -9=boo-9, 29=boo29}, size = 5 debug() output: index data 0 null 1 null 2 112=boo112 --> 42=boo42 3 null 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 5 after putting 82, map = {82=boo82, 112=boo112, 42=boo42, 17=boo17, -9=boo-9, 29=boo29}, size = 6 debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 --> 42=boo42 3 null 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 6 after putting 53, map = {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29}, size = 7 debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 --> 42=boo42 3 53=boo53 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 7 test containsKey(): {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 42)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 29)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 42)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 17)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(112)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( -9)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 17)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 82)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 53)? true {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 55)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(182)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(-91)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(888)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 72)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey( 33)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(999)? false {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29} containsKey(-17)? false test keySet(): keySet() = [17, 53, -9, 112, 82, 42, 29] test remove(): after removing 55, map = {82=boo82, 112=boo112, 42=boo42, 53=boo53, 17=boo17, -9=boo-9, 29=boo29}, size = 7, containsKey(55)? false debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 --> 42=boo42 3 53=boo53 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 7 after removing 42, map = {82=boo82, 112=boo112, 53=boo53, 17=boo17, -9=boo-9, 29=boo29}, size = 6, containsKey(42)? false debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 3 53=boo53 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 6 after removing 182, map = {82=boo82, 112=boo112, 53=boo53, 17=boo17, -9=boo-9, 29=boo29}, size = 6, containsKey(182)? false debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 3 53=boo53 4 null 5 null 6 null 7 17=boo17 8 null 9 -9=boo-9 --> 29=boo29 size 6 after removing 17, map = {82=boo82, 112=boo112, 53=boo53, -9=boo-9, 29=boo29}, size = 5, containsKey(17)? false debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 3 53=boo53 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 5 after removing -91, map = {82=boo82, 112=boo112, 53=boo53, -9=boo-9, 29=boo29}, size = 5, containsKey(-91)? false debug() output: index data 0 null 1 null 2 82=boo82 --> 112=boo112 3 53=boo53 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 5 after removing 82, map = {112=boo112, 53=boo53, -9=boo-9, 29=boo29}, size = 4, containsKey(82)? false debug() output: index data 0 null 1 null 2 112=boo112 3 53=boo53 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 4 after putting 22, map = {22=foo, 112=boo112, 53=boo53, -9=boo-9, 29=boo29}, size = 5, containsKey(22)? true debug() output: index data 0 null 1 null 2 22=foo --> 112=boo112 3 53=boo53 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 5 test put() with many elements: after putting 33, map = {22=foo, 112=boo112, 33=foo33, 53=boo53, -9=boo-9, 29=boo29}, size = 6, containsKey(33)? true debug() output: index data 0 null 1 null 2 22=foo --> 112=boo112 3 33=foo33 --> 53=boo53 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 6 after putting 56, map = {22=foo, 112=boo112, 33=foo33, 53=boo53, 56=foo56, -9=boo-9, 29=boo29}, size = 7, containsKey(56)? true debug() output: index data 0 null 1 null 2 22=foo --> 112=boo112 3 33=foo33 --> 53=boo53 4 null 5 null 6 56=foo56 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 7 after putting 22, map = {22=foo22, 112=boo112, 33=foo33, 53=boo53, 56=foo56, -9=boo-9, 29=boo29}, size = 7, containsKey(22)? true debug() output: index data 0 null 1 null 2 22=foo22 --> 112=boo112 3 33=foo33 --> 53=boo53 4 null 5 null 6 56=foo56 7 null 8 null 9 -9=boo-9 --> 29=boo29 size 7 after putting 19, map = {22=foo22, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 19=foo19}, size = 8, containsKey(19)? true debug() output: index data 0 null 1 null 2 22=foo22 3 null 4 null 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 null 18 null 19 19=foo19 size 8 after putting 41, map = {41=foo41, 22=foo22, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 19=foo19}, size = 9, containsKey(41)? true debug() output: index data 0 null 1 41=foo41 2 22=foo22 3 null 4 null 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 null 18 null 19 19=foo19 size 9 after putting 104, map = {41=foo41, 22=foo22, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 19=foo19}, size = 10, containsKey(104)? true debug() output: index data 0 null 1 41=foo41 2 22=foo22 3 null 4 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 null 18 null 19 19=foo19 size 10 after putting -2, map = {41=foo41, -2=foo-2, 22=foo22, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 19=foo19}, size = 11, containsKey(-2)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 null 18 null 19 19=foo19 size 11 after putting 97, map = {41=foo41, -2=foo-2, 22=foo22, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 97=foo97, 19=foo19}, size = 12, containsKey(97)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 size 12 after putting 97, map = {41=foo41, -2=foo-2, 22=foo22, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 97=foo97, 19=foo19}, size = 12, containsKey(97)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 size 12 after putting 22, map = {41=foo41, -2=foo-2, 22=foo22, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 97=foo97, 19=foo19}, size = 12, containsKey(22)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 size 12 after putting 984, map = {41=foo41, -2=foo-2, 22=foo22, 984=foo984, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, 97=foo97, 19=foo19}, size = 13, containsKey(984)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 984=foo984 --> 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 size 13 after putting -797, map = {41=foo41, -2=foo-2, 22=foo22, 984=foo984, 104=foo104, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, -797=foo-797, 97=foo97, 19=foo19}, size = 14, containsKey(-797)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 984=foo984 --> 104=foo104 5 null 6 null 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 -797=foo-797 --> 97=foo97 18 null 19 19=foo19 size 14 after putting 66, map = {41=foo41, -2=foo-2, 22=foo22, 984=foo984, 104=foo104, 66=foo66, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, -797=foo-797, 97=foo97, 19=foo19}, size = 15, containsKey(66)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 984=foo984 --> 104=foo104 5 null 6 66=foo66 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 -797=foo-797 --> 97=foo97 18 null 19 19=foo19 size 15 after putting 33, map = {41=foo41, -2=foo-2, 22=foo22, 984=foo984, 104=foo104, 66=foo66, 29=boo29, -9=boo-9, 112=boo112, 53=boo53, 33=foo33, 56=foo56, -797=foo-797, 97=foo97, 19=foo19}, size = 15, containsKey(33)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 --> 22=foo22 3 null 4 984=foo984 --> 104=foo104 5 null 6 66=foo66 7 null 8 null 9 29=boo29 --> -9=boo-9 10 null 11 null 12 112=boo112 13 53=boo53 --> 33=foo33 14 null 15 null 16 56=foo56 17 -797=foo-797 --> 97=foo97 18 null 19 19=foo19 size 15 after putting 90210, map = {41=foo41, -2=foo-2, -9=boo-9, 90210=foo90210, 53=boo53, 56=foo56, 97=foo97, 19=foo19, 22=foo22, 104=foo104, 984=foo984, 66=foo66, 29=boo29, 112=boo112, 33=foo33, -797=foo-797}, size = 16, containsKey(90210)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 3 null 4 null 5 null 6 null 7 null 8 null 9 -9=boo-9 10 90210=foo90210 11 null 12 null 13 53=boo53 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 20 null 21 null 22 22=foo22 23 null 24 104=foo104 --> 984=foo984 25 null 26 66=foo66 27 null 28 null 29 29=boo29 30 null 31 null 32 112=boo112 33 33=foo33 34 null 35 null 36 null 37 -797=foo-797 38 null 39 null size 16 after putting 44444, map = {41=foo41, -2=foo-2, 44444=foo44444, -9=boo-9, 90210=foo90210, 53=boo53, 56=foo56, 97=foo97, 19=foo19, 22=foo22, 104=foo104, 984=foo984, 66=foo66, 29=boo29, 112=boo112, 33=foo33, -797=foo-797}, size = 17, containsKey(44444)? true debug() output: index data 0 null 1 41=foo41 2 -2=foo-2 3 null 4 44444=foo44444 5 null 6 null 7 null 8 null 9 -9=boo-9 10 90210=foo90210 11 null 12 null 13 53=boo53 14 null 15 null 16 56=foo56 17 97=foo97 18 null 19 19=foo19 20 null 21 null 22 22=foo22 23 null 24 104=foo104 --> 984=foo984 25 null 26 66=foo66 27 null 28 null 29 29=boo29 30 null 31 null 32 112=boo112 33 33=foo33 34 null 35 null 36 null 37 -797=foo-797 38 null 39 null size 17 test keySet(): keySet() = [984, 33, 66, 97, 41, 104, 19, 90210, -797, 44444, 53, 112, -9, 22, 56, 29, -2] test clear(): after clear #1, map = {}, size = 0, isEmpty = true keySet() = [] after clear #2, map = {}, size = 0, isEmpty = true