aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@verizonmedia.com>2019-10-18 16:36:56 +0200
committerHåkon Hallingstad <hakon@verizonmedia.com>2019-10-18 16:36:56 +0200
commitd1c56e768c02f9c4a34150c365a79a863b2303ab (patch)
treede74f8f4c98f9fd337157de922179dc067734ab5 /document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java
parentb41c0a72ec634799470f76b93121ab6201bd2d41 (diff)
Use correct contains method
Diffstat (limited to 'document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java')
-rw-r--r--document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java b/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java
index 458253333ba..db0c986bac3 100644
--- a/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java
+++ b/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java
@@ -60,7 +60,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.mockito.ArgumentMatchers;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -80,6 +79,7 @@ import static com.yahoo.document.json.readers.SingleValueReader.UPDATE_DIVIDE;
import static com.yahoo.document.json.readers.SingleValueReader.UPDATE_INCREMENT;
import static com.yahoo.document.json.readers.SingleValueReader.UPDATE_MULTIPLY;
import static com.yahoo.test.json.JsonTestHelper.inputJson;
+import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -1733,7 +1733,7 @@ public class JsonReaderTestCase {
@Test
public void requireThatUnknownDocTypeThrowsIllegalArgumentException() {
exception.expect(IllegalArgumentException.class);
- exception.expectMessage(ArgumentMatchers.contains("Document type walrus does not exist"));
+ exception.expectMessage(containsString("Document type walrus does not exist"));
final String jsonData = inputJson(
"[",
@@ -1903,7 +1903,7 @@ public class JsonReaderTestCase {
// NOTE: Do not call this method multiple times from a test method as it's using the ExpectedException rule
private void assertParserErrorMatches(String expectedError, String... json) {
exception.expect(JsonReaderException.class);
- exception.expectMessage(ArgumentMatchers.contains(expectedError));
+ exception.expectMessage(containsString(expectedError));
String jsonData = inputJson(json);
new JsonReader(types, jsonToInputStream(jsonData), parserFactory).next();
}