summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2019-08-18 22:31:20 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-18 22:31:20 +0000
commit9b53862826a824f2a4443ddb5d4990f421d191ad (patch)
tree2f838b4dc26b81e7ba998db66af45c329068e5a0
parent969ba75d37bd98cbe0cbbd2e1cec969b5d25f90d (diff)
parent279f6cf543a6d28204b9ab954a49eee3ca211642 (diff)
Merge "Removed unused imports"
-rw-r--r--components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DbControllerTest.java9
-rw-r--r--components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DesignTypeControllerTest.java2
-rw-r--r--components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/FeederControllerTest.java10
-rw-r--r--components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/TopicControllerTest.java9
4 files changed, 9 insertions, 21 deletions
diff --git a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DbControllerTest.java b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DbControllerTest.java
index 54f53877..a4d0b0aa 100644
--- a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DbControllerTest.java
+++ b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DbControllerTest.java
@@ -27,11 +27,10 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.datalake.feeder.dto.DbConfig;
import org.onap.datalake.feeder.controller.domain.PostReturnBody;
import org.onap.datalake.feeder.domain.Db;
import org.onap.datalake.feeder.domain.Topic;
-import org.onap.datalake.feeder.domain.TopicName;
+import org.onap.datalake.feeder.dto.DbConfig;
import org.onap.datalake.feeder.repository.DbRepository;
import org.onap.datalake.feeder.service.DbService;
import org.onap.datalake.feeder.util.TestUtil;
@@ -50,6 +49,7 @@ import java.util.Collections;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
+
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
@@ -81,9 +81,6 @@ public class DbControllerTest {
public void setAccessPrivateFields(DbController dbController) throws NoSuchFieldException,
IllegalAccessException {
- // Field dbService = dbController.getClass().getDeclaredField("dbService");
- // dbService.setAccessible(true);
-// dbService.set(dbController, dbService1);
Field dbRepository1 = dbController.getClass().getDeclaredField("dbRepository");
dbRepository1.setAccessible(true);
dbRepository1.set(dbController, dbRepository);
@@ -176,8 +173,6 @@ public class DbControllerTest {
DbController dbController = new DbController();
DbConfig dbConfig = getDbConfig();
setAccessPrivateFields(dbController);
- String name = "Elecsticsearch";
- //when(dbRepository.findByName(name)).thenReturn(newDb(name));
PostReturnBody<DbConfig> db = dbController.createDb(dbConfig, mockBindingResult, httpServletResponse);
assertNotNull(db);
}
diff --git a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DesignTypeControllerTest.java b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DesignTypeControllerTest.java
index 79c0c846..91af11ca 100644
--- a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DesignTypeControllerTest.java
+++ b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/DesignTypeControllerTest.java
@@ -33,7 +33,7 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
@RunWith(MockitoJUnitRunner.class)
public class DesignTypeControllerTest {
diff --git a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/FeederControllerTest.java b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/FeederControllerTest.java
index 84d7d0a9..eb2955d4 100644
--- a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/FeederControllerTest.java
+++ b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/FeederControllerTest.java
@@ -19,11 +19,6 @@
*/
package org.onap.datalake.feeder.controller;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
@@ -32,6 +27,11 @@ import org.mockito.junit.MockitoJUnitRunner;
import org.onap.datalake.feeder.config.ApplicationConfiguration;
import org.onap.datalake.feeder.service.PullService;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+
@RunWith(MockitoJUnitRunner.class)
public class FeederControllerTest {
@Mock
diff --git a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/TopicControllerTest.java b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/TopicControllerTest.java
index d55e6457..1a866bd1 100644
--- a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/TopicControllerTest.java
+++ b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/controller/TopicControllerTest.java
@@ -24,14 +24,11 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
import org.mockito.junit.MockitoJUnitRunner;
import org.onap.datalake.feeder.config.ApplicationConfiguration;
import org.onap.datalake.feeder.controller.domain.PostReturnBody;
-import org.onap.datalake.feeder.dto.TopicConfig;
-import org.onap.datalake.feeder.domain.Db;
import org.onap.datalake.feeder.domain.Topic;
-import org.onap.datalake.feeder.domain.TopicName;
+import org.onap.datalake.feeder.dto.TopicConfig;
import org.onap.datalake.feeder.repository.TopicNameRepository;
import org.onap.datalake.feeder.repository.TopicRepository;
import org.onap.datalake.feeder.service.DbService;
@@ -42,12 +39,8 @@ import org.springframework.validation.BindingResult;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.lang.reflect.Field;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
-import java.util.Optional;
-import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;