|
18 | 18 | import static org.hamcrest.Matchers.containsInAnyOrder;
|
19 | 19 | import static org.hamcrest.Matchers.containsInRelativeOrder;
|
20 | 20 | import static org.hamcrest.Matchers.containsString;
|
| 21 | +import static org.hamcrest.Matchers.hasItem; |
21 | 22 | import static org.hamcrest.Matchers.not;
|
22 | 23 | import static org.junit.Assert.assertEquals;
|
23 | 24 | import static org.junit.Assert.assertTrue;
|
@@ -51,7 +52,7 @@ public void warnsAndClearsDeprecatedScriptHashes() throws Throwable {
|
51 | 52 | session.then(r -> {
|
52 | 53 | final ScriptApproval approval = ScriptApproval.get();
|
53 | 54 | assertEquals(2, approval.countDeprecatedApprovedScriptHashes());
|
54 |
| - assertThat(log.getMessages(), containsInAnyOrder( |
| 55 | + assertThat(log.getMessages(), hasItem( |
55 | 56 | containsString("There are 2 deprecated approved script hashes " +
|
56 | 57 | "and 0 deprecated approved classpath hashes.")));
|
57 | 58 | approval.clearDeprecatedApprovedScripts();
|
@@ -102,7 +103,7 @@ public void testConvertApprovedClasspathEntries() throws Throwable {
|
102 | 103 | final ScriptApproval approval = ScriptApproval.get();
|
103 | 104 | assertEquals(2, approval.countDeprecatedApprovedClasspathHashes());
|
104 | 105 |
|
105 |
| - assertThat(log.getMessages(), containsInAnyOrder( |
| 106 | + assertThat(log.getMessages(), hasItem( |
106 | 107 | containsString("There are 0 deprecated approved script hashes " +
|
107 | 108 | "and 2 deprecated approved classpath hashes.")));
|
108 | 109 |
|
|
0 commit comments