aboutsummaryrefslogtreecommitdiffstats
path: root/testutil/src/test/java/com/yahoo/test/MatchersTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'testutil/src/test/java/com/yahoo/test/MatchersTestCase.java')
-rw-r--r--testutil/src/test/java/com/yahoo/test/MatchersTestCase.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/testutil/src/test/java/com/yahoo/test/MatchersTestCase.java b/testutil/src/test/java/com/yahoo/test/MatchersTestCase.java
index 839856db7f2..c36818e4f7f 100644
--- a/testutil/src/test/java/com/yahoo/test/MatchersTestCase.java
+++ b/testutil/src/test/java/com/yahoo/test/MatchersTestCase.java
@@ -1,13 +1,14 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.test;
-import static org.junit.Assert.assertEquals;
-
-import java.util.Arrays;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import org.hamcrest.Matcher;
import org.junit.Test;
+import java.util.List;
+
/**
* Tests for com.yahoo.test.Matchers.
*
@@ -18,16 +19,9 @@ public class MatchersTestCase {
@Test
public final void testHasItemWithMethodObjectString() {
@SuppressWarnings("rawtypes")
- final Matcher<Iterable> m = Matchers.hasItemWithMethod("nalle",
- "toLowerCase");
- assertEquals(
- false,
- m.matches(Arrays.asList(new Object[] { Integer.valueOf(1),
- Character.valueOf('c'), "blbl" })));
- assertEquals(
- true,
- m.matches(Arrays.asList(new Object[] { Character.valueOf('c'),
- "NALLE" })));
+ final Matcher<Iterable> m = Matchers.hasItemWithMethod("nalle", "toLowerCase");
+ assertFalse(m.matches(List.of(new Object[]{1, 'c', "blbl"})));
+ assertTrue(m.matches(List.of(new Object[]{'c', "NALLE"})));
}
}