Migrate Mockito 1 to version 2 in the traversal service
[aai/traversal.git] / aai-traversal / src / test / java / org / onap / aai / rest / search / ModelAndNamedQueryRestProviderTest.java
index 5d2002e..2f2a703 100644 (file)
@@ -21,16 +21,27 @@ package org.onap.aai.rest.search;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.anyObject;
+import static org.mockito.ArgumentMatchers.anyObject;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.*;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.*;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
 
 import org.apache.commons.io.IOUtils;
 import org.junit.Before;
@@ -38,7 +49,6 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.onap.aai.AAISetup;
-import org.onap.aai.introspection.ModelType;
 import org.onap.aai.setup.SchemaVersion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,7 +60,6 @@ public class ModelAndNamedQueryRestProviderTest extends AAISetup {
     private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
 
     private SchemaVersion version;
-    private static final ModelType introspectorFactoryType = ModelType.MOXY;
 
     static {
         VALID_HTTP_STATUS_CODES.add(200);
@@ -194,6 +203,6 @@ public class ModelAndNamedQueryRestProviderTest extends AAISetup {
         String message = String.format("Unable to find the %s in src/test/resources", filename);
         assertNotNull(message, inputStream);
 
-        return IOUtils.toString(inputStream);
+        return IOUtils.toString(inputStream, StandardCharsets.UTF_8);
     }
 }