From d1c56e768c02f9c4a34150c365a79a863b2303ab Mon Sep 17 00:00:00 2001 From: HÃ¥kon Hallingstad Date: Fri, 18 Oct 2019 16:36:56 +0200 Subject: Use correct contains method --- .../src/test/java/com/yahoo/document/json/JsonReaderTestCase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'document') 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(); } -- cgit v1.2.3