|
17 | 17 |
|
18 | 18 | package org.apache.commons.collections4.map; |
19 | 19 |
|
| 20 | +import static org.junit.Assert.assertNull; |
| 21 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
| 22 | +import static org.junit.jupiter.api.Assertions.assertNotEquals; |
| 23 | + |
20 | 24 | import java.util.Objects; |
21 | 25 |
|
22 | | -import org.junit.jupiter.api.Assertions; |
23 | 26 | import org.junit.jupiter.api.Test; |
24 | 27 |
|
25 | 28 | /** |
@@ -85,16 +88,16 @@ void testMutateKey() { |
85 | 88 | final KeyFixture keyFixture2Ro = new KeyFixture(); |
86 | 89 | final KeyFixture keyFixture2Rw = new KeyFixture(); |
87 | 90 | // Put original mapping |
88 | | - Assertions.assertNull(multiKeyMap.put(KEY_1, keyFixture2Rw, "value")); |
| 91 | + assertNull(multiKeyMap.put(KEY_1, keyFixture2Rw, "value")); |
89 | 92 | // Both mappings are correct |
90 | | - Assertions.assertEquals("value", multiKeyMap.get(KEY_1, keyFixture2Rw)); |
91 | | - Assertions.assertEquals("value", multiKeyMap.get(KEY_1, keyFixture2Ro)); |
| 93 | + assertEquals("value", multiKeyMap.get(KEY_1, keyFixture2Rw)); |
| 94 | + assertEquals("value", multiKeyMap.get(KEY_1, keyFixture2Ro)); |
92 | 95 | // Modify 'fixture2' |
93 | 96 | keyFixture2Rw.setValue("newValue"); |
94 | 97 | // Modified mapping SHOULD NOT work |
95 | | - Assertions.assertNull(multiKeyMap.get(KEY_1, keyFixture2Rw)); |
| 98 | + assertNull(multiKeyMap.get(KEY_1, keyFixture2Rw)); |
96 | 99 | // Claim: Original mapping SHOULD work |
97 | 100 | // COUNTER CLAIM: The class is documented to use MultiKey which documents key elements as "The keys should be immutable". |
98 | | - Assertions.assertNotEquals("value", multiKeyMap.get(KEY_1, keyFixture2Ro)); |
| 101 | + assertNotEquals("value", multiKeyMap.get(KEY_1, keyFixture2Ro)); |
99 | 102 | } |
100 | 103 | } |
0 commit comments