Reduce the number of problems in aai-common by removing unused imports
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / rest / ueb / UEBNotificationTest.java
index 58b96e4..efa4325 100644 (file)
 
 package org.onap.aai.rest.ueb;
 
+import static org.junit.Assert.assertEquals;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.UUID;
+
+import javax.ws.rs.core.Response;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.aai.AAISetup;
@@ -34,15 +44,6 @@ import org.onap.aai.setup.SchemaVersion;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.annotation.DirtiesContext;
 
-import javax.ws.rs.core.Response;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.UUID;
-
-import static org.junit.Assert.assertEquals;
-
 @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
 public class UEBNotificationTest extends AAISetup {
 
@@ -58,7 +59,6 @@ public class UEBNotificationTest extends AAISetup {
 
     public QueryStyle queryStyle = QueryStyle.TRAVERSAL_URI;
 
-
     @Before
     public void setup() throws Exception {
         version = schemaVersions.getDefaultVersion();
@@ -72,20 +72,13 @@ public class UEBNotificationTest extends AAISetup {
         pserver.setValue("hostname", "hn");
         URI uri = new URI("/cloud-infrastructure/pservers/pserver/hn");
         UEBNotification uebNotification = new UEBNotification(loader, loaderFactory, schemaVersions);
-        uebNotification.createNotificationEvent(
-            UUID.randomUUID().toString(),
-            "JUNIT-SOT",
-            Response.Status.CREATED,
-            uri,
-            pserver,
-            new HashMap<>(),
-            BASE_PATH);
+        uebNotification.createNotificationEvent(UUID.randomUUID().toString(), "JUNIT-SOT", Response.Status.CREATED, uri,
+                pserver, new HashMap<>(), BASE_PATH);
 
         assertEquals("One event created", 1, uebNotification.getEvents().size());
-        assertEquals(
-            "Uri is correct",
-            BASE_PATH + "/" + schemaVersions.getDefaultVersion() + "/cloud-infrastructure/pservers/pserver/hn",
-            uebNotification.getEvents().get(0).getEventHeader().getValue("entity-link").toString());
+        assertEquals("Uri is correct",
+                BASE_PATH + "/" + schemaVersions.getDefaultVersion() + "/cloud-infrastructure/pservers/pserver/hn",
+                uebNotification.getEvents().get(0).getEventHeader().getValue("entity-link").toString());
     }
 
     @Test
@@ -95,18 +88,12 @@ public class UEBNotificationTest extends AAISetup {
         pserver.setValue("hostname", "hn");
         URI uri = new URI(BASE_PATH + "/v12/cloud-infrastructure/pservers/pserver/hn");
         UEBNotification uebNotification = new UEBNotification(loader, loaderFactory, schemaVersions);
-        uebNotification.createNotificationEvent(
-            UUID.randomUUID().toString(),
-            "JUNIT-SOT",
-            Response.Status.CREATED,
-            uri,
-            pserver,
-            new HashMap<>(), BASE_PATH);
+        uebNotification.createNotificationEvent(UUID.randomUUID().toString(), "JUNIT-SOT", Response.Status.CREATED, uri,
+                pserver, new HashMap<>(), BASE_PATH);
 
         assertEquals("One event created", 1, uebNotification.getEvents().size());
-        assertEquals(
-            "Uri is correct",
-            BASE_PATH + "/" + schemaVersions.getDefaultVersion() + "/cloud-infrastructure/pservers/pserver/hn",
-            uebNotification.getEvents().get(0).getEventHeader().getValue("entity-link").toString());
+        assertEquals("Uri is correct",
+                BASE_PATH + "/" + schemaVersions.getDefaultVersion() + "/cloud-infrastructure/pservers/pserver/hn",
+                uebNotification.getEvents().get(0).getEventHeader().getValue("entity-link").toString());
     }
 }