aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2018-09-21 16:07:37 +0100
committermark.j.leonard <mark.j.leonard@gmail.com>2018-09-21 16:07:37 +0100
commit71393bb2bf9fb10962723e61cf0e70d9aa202645 (patch)
treeb1a7c99248044d95353a01c864803e48fb891352
parent61fd3fcf2ec5f474c7290347d9d77a923fa44460 (diff)
Organise imports to ONAP Java standards
Fix all import ordering. Change-Id: Ia0a0ef64eab7b1560c7dd1d54a1a9e1adee67a5e Issue-ID: AAI-1650 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
-rw-r--r--src/main/java/org/onap/aai/sa/Application.java3
-rw-r--r--src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuth.java3
-rw-r--r--src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuthCore.java15
-rw-r--r--src/main/java/org/onap/aai/sa/rest/AnalysisConfiguration.java12
-rw-r--r--src/main/java/org/onap/aai/sa/rest/AnalyzerApi.java14
-rw-r--r--src/main/java/org/onap/aai/sa/rest/ApiUtils.java5
-rw-r--r--src/main/java/org/onap/aai/sa/rest/BulkApi.java7
-rw-r--r--src/main/java/org/onap/aai/sa/rest/Document.java1
-rw-r--r--src/main/java/org/onap/aai/sa/rest/DocumentApi.java15
-rw-r--r--src/main/java/org/onap/aai/sa/rest/IndexApi.java24
-rw-r--r--src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java16
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java2
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchError.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchOperationStatus.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationBucket.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationResult.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/logging/SearchDbMsgs.java2
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatement.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatement.java3
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SuggestionStatement.java3
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQuery.java1
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/service/SearchService.java9
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/util/AggregationParsingUtil.java5
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/util/DocumentSchemaUtil.java8
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslator.java6
-rw-r--r--src/test/java/org/onap/aai/sa/auth/SearchDbServiceAuthTest.java9
-rw-r--r--src/test/java/org/onap/aai/sa/rest/ApiUtilsTest.java6
-rw-r--r--src/test/java/org/onap/aai/sa/rest/BulkApiTest.java4
-rw-r--r--src/test/java/org/onap/aai/sa/rest/DocumentApiTest.java23
-rw-r--r--src/test/java/org/onap/aai/sa/rest/DocumentSchemaTest.java10
-rw-r--r--src/test/java/org/onap/aai/sa/rest/DocumentTest.java11
-rw-r--r--src/test/java/org/onap/aai/sa/rest/IndexApiTest.java17
-rw-r--r--src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java14
-rw-r--r--src/test/java/org/onap/aai/sa/rest/StubEsController.java18
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfigTest.java3
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatementTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateHistogramAggregationTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeAggregationTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java4
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/GroupByAggregationTest.java7
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/QueryTest.java12
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/RangeQueryTest.java6
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatementTest.java16
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SortTest.java8
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQueryTest.java3
-rw-r--r--src/test/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslatorTest.java4
48 files changed, 154 insertions, 215 deletions
diff --git a/src/main/java/org/onap/aai/sa/Application.java b/src/main/java/org/onap/aai/sa/Application.java
index 03f8690..cd253c6 100644
--- a/src/main/java/org/onap/aai/sa/Application.java
+++ b/src/main/java/org/onap/aai/sa/Application.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa;
+import java.util.HashMap;
import org.eclipse.jetty.util.security.Password;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
-import java.util.HashMap;
-
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
diff --git a/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuth.java b/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuth.java
index 59ae82b..1ef3dde 100644
--- a/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuth.java
+++ b/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuth.java
@@ -20,9 +20,8 @@
*/
package org.onap.aai.sa.auth;
- import org.springframework.http.HttpHeaders;
-
import javax.servlet.http.Cookie;
+import org.springframework.http.HttpHeaders;
public class SearchDbServiceAuth {
diff --git a/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuthCore.java b/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuthCore.java
index bd4f1a5..1bd922f 100644
--- a/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuthCore.java
+++ b/src/main/java/org/onap/aai/sa/auth/SearchDbServiceAuthCore.java
@@ -23,18 +23,21 @@ package org.onap.aai.sa.auth;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Timer;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.*;
-
public class SearchDbServiceAuthCore {
private static Logger logger = LoggerFactory.getInstance()
diff --git a/src/main/java/org/onap/aai/sa/rest/AnalysisConfiguration.java b/src/main/java/org/onap/aai/sa/rest/AnalysisConfiguration.java
index ecb3f4d..f30075a 100644
--- a/src/main/java/org/onap/aai/sa/rest/AnalysisConfiguration.java
+++ b/src/main/java/org/onap/aai/sa/rest/AnalysisConfiguration.java
@@ -21,17 +21,13 @@
package org.onap.aai.sa.rest;
import com.fasterxml.jackson.databind.ObjectMapper;
-
-import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
-import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
-import org.onap.aai.cl.api.Logger;
-import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.aai.sa.rest.AnalyzerSchema;
-import org.onap.aai.sa.rest.FilterSchema;
-
import java.io.File;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
+import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
/**
* This class encapsulates the configuration of the predefined
diff --git a/src/main/java/org/onap/aai/sa/rest/AnalyzerApi.java b/src/main/java/org/onap/aai/sa/rest/AnalyzerApi.java
index 86be0fd..210953d 100644
--- a/src/main/java/org/onap/aai/sa/rest/AnalyzerApi.java
+++ b/src/main/java/org/onap/aai/sa/rest/AnalyzerApi.java
@@ -20,23 +20,19 @@
*/
package org.onap.aai.sa.rest;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
-import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.servlet.http.HttpServletRequest;
import org.onap.aai.cl.api.LogFields;
import org.onap.aai.cl.api.LogLine;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.aai.sa.rest.AnalyzerSchema;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.servlet.http.HttpServletRequest;
-
-
+import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
+import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestHeader;
diff --git a/src/main/java/org/onap/aai/sa/rest/ApiUtils.java b/src/main/java/org/onap/aai/sa/rest/ApiUtils.java
index baa63b8..a2ef2b1 100644
--- a/src/main/java/org/onap/aai/sa/rest/ApiUtils.java
+++ b/src/main/java/org/onap/aai/sa/rest/ApiUtils.java
@@ -20,15 +20,14 @@
*/
package org.onap.aai.sa.rest;
+import java.util.UUID;
+import javax.servlet.http.HttpServletRequest;
import org.onap.aai.cl.mdc.MdcContext;
import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
import org.slf4j.MDC;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
-import javax.servlet.http.HttpServletRequest;
-import java.util.UUID;
-
// Spring Imports
public class ApiUtils {
diff --git a/src/main/java/org/onap/aai/sa/rest/BulkApi.java b/src/main/java/org/onap/aai/sa/rest/BulkApi.java
index ea3e897..0770bf1 100644
--- a/src/main/java/org/onap/aai/sa/rest/BulkApi.java
+++ b/src/main/java/org/onap/aai/sa/rest/BulkApi.java
@@ -23,6 +23,9 @@ package org.onap.aai.sa.rest;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.main.JsonSchemaFactory;
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.servlet.http.HttpServletRequest;
import org.onap.aai.cl.api.LogFields;
import org.onap.aai.cl.api.LogLine;
import org.onap.aai.cl.api.Logger;
@@ -36,10 +39,6 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
/**
* This class encapsulates the REST end points associated with performing
diff --git a/src/main/java/org/onap/aai/sa/rest/Document.java b/src/main/java/org/onap/aai/sa/rest/Document.java
index c1dd9cc..50ef9ea 100644
--- a/src/main/java/org/onap/aai/sa/rest/Document.java
+++ b/src/main/java/org/onap/aai/sa/rest/Document.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-
import java.util.HashMap;
import java.util.Map;
diff --git a/src/main/java/org/onap/aai/sa/rest/DocumentApi.java b/src/main/java/org/onap/aai/sa/rest/DocumentApi.java
index ac7610b..ca1b351 100644
--- a/src/main/java/org/onap/aai/sa/rest/DocumentApi.java
+++ b/src/main/java/org/onap/aai/sa/rest/DocumentApi.java
@@ -23,6 +23,13 @@ package org.onap.aai.sa.rest;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+//import javax.ws.rs.core.HttpHeaders;
+//import javax.ws.rs.core.MediaType;
+//import javax.ws.rs.core.Response;
+//import javax.ws.rs.core.Response.Status;
+// Spring Imports
import org.onap.aai.cl.api.LogFields;
import org.onap.aai.cl.api.LogLine;
import org.onap.aai.cl.api.Logger;
@@ -40,14 +47,6 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-//import javax.ws.rs.core.HttpHeaders;
-//import javax.ws.rs.core.MediaType;
-//import javax.ws.rs.core.Response;
-//import javax.ws.rs.core.Response.Status;
-// Spring Imports
-
public class DocumentApi {
private static final String REQUEST_HEADER_RESOURCE_VERSION = "If-Match";
private static final String RESPONSE_HEADER_RESOURCE_VERSION = "ETag";
diff --git a/src/main/java/org/onap/aai/sa/rest/IndexApi.java b/src/main/java/org/onap/aai/sa/rest/IndexApi.java
index d43fa8b..f5840e2 100644
--- a/src/main/java/org/onap/aai/sa/rest/IndexApi.java
+++ b/src/main/java/org/onap/aai/sa/rest/IndexApi.java
@@ -21,29 +21,23 @@
package org.onap.aai.sa.rest;
import com.fasterxml.jackson.databind.ObjectMapper;
-
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreInterface;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.exception.DocumentStoreOperationException;
-import org.onap.aai.sa.searchdbabstraction.entity.OperationResult;
-import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
import org.onap.aai.cl.api.LogFields;
import org.onap.aai.cl.api.LogLine;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.aai.sa.rest.DocumentFieldSchema;
-import org.onap.aai.sa.rest.DocumentSchema;
-import org.slf4j.MDC;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-
+import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreInterface;
+import org.onap.aai.sa.searchdbabstraction.elasticsearch.exception.DocumentStoreOperationException;
+import org.onap.aai.sa.searchdbabstraction.entity.OperationResult;
+import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
// Spring Imports
import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
import org.springframework.http.HttpStatus;
// import org.springframework.http.server.HttpServletRequest;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
/**
diff --git a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java
index 98b164b..aacba78 100644
--- a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java
+++ b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java
@@ -20,6 +20,10 @@
*/
package org.onap.aai.sa.rest;
+import java.security.cert.X509Certificate;
+import javax.security.auth.x500.X500Principal;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import org.onap.aai.sa.auth.SearchDbServiceAuth;
import org.onap.aai.sa.rest.ApiUtils.Action;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreInterface;
@@ -28,12 +32,12 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.*;
-
-import javax.security.auth.x500.X500Principal;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.security.cert.X509Certificate;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
@Component
@EnableWebSecurity
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java
index a9d5678..5eaf9a3 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java
@@ -22,11 +22,11 @@ package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao;
import org.onap.aai.sa.rest.BulkRequest;
+import org.onap.aai.sa.rest.DocumentSchema;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.exception.DocumentStoreOperationException;
import org.onap.aai.sa.searchdbabstraction.entity.DocumentOperationResult;
import org.onap.aai.sa.searchdbabstraction.entity.OperationResult;
import org.onap.aai.sa.searchdbabstraction.entity.SearchOperationResult;
-import org.onap.aai.sa.rest.DocumentSchema;
public interface DocumentStoreInterface {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchError.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchError.java
index da5719f..27493a0 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchError.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchError.java
@@ -22,7 +22,6 @@ package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
-
import java.util.HashMap;
import java.util.Map;
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchOperationStatus.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchOperationStatus.java
index f4ac5eb..8ad1ba8 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchOperationStatus.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchOperationStatus.java
@@ -22,7 +22,6 @@ package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
-
import java.util.HashMap;
import java.util.Map;
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationBucket.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationBucket.java
index cef1d84..9edea09 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationBucket.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationBucket.java
@@ -21,7 +21,6 @@
package org.onap.aai.sa.searchdbabstraction.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
-
import java.util.Arrays;
public class AggregationBucket {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationResult.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationResult.java
index 100fbf6..88d33b8 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationResult.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/entity/AggregationResult.java
@@ -21,7 +21,6 @@
package org.onap.aai.sa.searchdbabstraction.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
-
import java.util.Arrays;
public class AggregationResult {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/logging/SearchDbMsgs.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/logging/SearchDbMsgs.java
index def336a..9ba8fef 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/logging/SearchDbMsgs.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/logging/SearchDbMsgs.java
@@ -20,8 +20,8 @@
*/
package org.onap.aai.sa.searchdbabstraction.logging;
-import org.onap.aai.cl.eelf.LogMessageEnum;
import com.att.eelf.i18n.EELFResourceManager;
+import org.onap.aai.cl.eelf.LogMessageEnum;
public enum SearchDbMsgs implements LogMessageEnum {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatement.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatement.java
index 02060fc..696c9d9 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatement.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatement.java
@@ -21,7 +21,6 @@
package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.annotation.JsonProperty;
-
import java.util.Arrays;
public class AggregationStatement {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatement.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatement.java
index c02133b..f008a7c 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatement.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatement.java
@@ -21,11 +21,10 @@
package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.annotation.JsonProperty;
-import org.radeox.util.logging.Logger;
-
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.radeox.util.logging.Logger;
/**
* This class represents the structure of a search statement.
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SuggestionStatement.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SuggestionStatement.java
index 69cddb0..1bc93b6 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SuggestionStatement.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/SuggestionStatement.java
@@ -20,9 +20,8 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import org.radeox.util.logging.Logger;
-
import com.fasterxml.jackson.annotation.JsonProperty;
+import org.radeox.util.logging.Logger;
/**
* This class represents the structure of a search statement.
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQuery.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQuery.java
index b84fe53..08bd501 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQuery.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQuery.java
@@ -22,7 +22,6 @@ package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
-
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/service/SearchService.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/service/SearchService.java
index afbdae8..2d7a290 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/service/SearchService.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/service/SearchService.java
@@ -20,17 +20,16 @@
*/
package org.onap.aai.sa.searchdbabstraction.service;
+import java.io.FileInputStream;
+import java.util.Properties;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.config.ElasticSearchConfig;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
-import org.onap.aai.cl.api.Logger;
-import org.onap.aai.cl.eelf.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import java.io.FileInputStream;
-import java.util.Properties;
-
public class SearchService {
private ElasticSearchHttpController esController = null;
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/AggregationParsingUtil.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/AggregationParsingUtil.java
index 76cf227..93ee23e 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/AggregationParsingUtil.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/AggregationParsingUtil.java
@@ -21,14 +21,13 @@
package org.onap.aai.sa.searchdbabstraction.util;
import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.Iterator;
+import java.util.Set;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.onap.aai.sa.searchdbabstraction.entity.AggregationBucket;
import org.onap.aai.sa.searchdbabstraction.entity.AggregationResult;
-import java.util.Iterator;
-import java.util.Set;
-
public class AggregationParsingUtil {
public static AggregationResult[] parseAggregationResults(JSONObject aggregations)
throws JsonProcessingException {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/DocumentSchemaUtil.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/DocumentSchemaUtil.java
index 3dc03f9..a22f59e 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/DocumentSchemaUtil.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/DocumentSchemaUtil.java
@@ -23,16 +23,14 @@ package org.onap.aai.sa.searchdbabstraction.util;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-
-import org.apache.commons.io.IOUtils;
-import org.onap.aai.sa.rest.DocumentFieldSchema;
-import org.onap.aai.sa.rest.DocumentSchema;
-
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.commons.io.IOUtils;
+import org.onap.aai.sa.rest.DocumentFieldSchema;
+import org.onap.aai.sa.rest.DocumentSchema;
public class DocumentSchemaUtil {
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslator.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslator.java
index 97f0ca1..d73001b 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslator.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslator.java
@@ -20,12 +20,13 @@
*/
package org.onap.aai.sa.searchdbabstraction.util;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.JsonPath;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.Map;
-
import org.apache.commons.io.IOUtils;
import org.json.JSONArray;
import org.json.JSONException;
@@ -34,9 +35,6 @@ import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
-import com.jayway.jsonpath.DocumentContext;
-import com.jayway.jsonpath.JsonPath;
-
/**
* This class as the name suggests is to translate the payload of PUT & POST requests
diff --git a/src/test/java/org/onap/aai/sa/auth/SearchDbServiceAuthTest.java b/src/test/java/org/onap/aai/sa/auth/SearchDbServiceAuthTest.java
index 7a117b7..3ffb422 100644
--- a/src/test/java/org/onap/aai/sa/auth/SearchDbServiceAuthTest.java
+++ b/src/test/java/org/onap/aai/sa/auth/SearchDbServiceAuthTest.java
@@ -20,6 +20,10 @@
*/
package org.onap.aai.sa.auth;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -28,11 +32,6 @@ import org.mockito.MockitoAnnotations;
import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
import org.springframework.http.HttpHeaders;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
// import javax.servlet.http.Cookie;
public class SearchDbServiceAuthTest {
diff --git a/src/test/java/org/onap/aai/sa/rest/ApiUtilsTest.java b/src/test/java/org/onap/aai/sa/rest/ApiUtilsTest.java
index 0274dd9..457dbdd 100644
--- a/src/test/java/org/onap/aai/sa/rest/ApiUtilsTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/ApiUtilsTest.java
@@ -20,11 +20,9 @@
*/
package org.onap.aai.sa.rest;
-import org.junit.Test;
-import org.onap.aai.sa.rest.ApiUtils;
-
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
public class ApiUtilsTest {
diff --git a/src/test/java/org/onap/aai/sa/rest/BulkApiTest.java b/src/test/java/org/onap/aai/sa/rest/BulkApiTest.java
index c7e9702..a1c255c 100644
--- a/src/test/java/org/onap/aai/sa/rest/BulkApiTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/BulkApiTest.java
@@ -24,6 +24,8 @@ package org.onap.aai.sa.rest;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+import java.io.File;
+import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -33,8 +35,6 @@ import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultActions;
-import java.io.File;
-import java.io.IOException;
/**
diff --git a/src/test/java/org/onap/aai/sa/rest/DocumentApiTest.java b/src/test/java/org/onap/aai/sa/rest/DocumentApiTest.java
index 49a10df..78fec3e 100644
--- a/src/test/java/org/onap/aai/sa/rest/DocumentApiTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/DocumentApiTest.java
@@ -20,6 +20,13 @@
*/
package org.onap.aai.sa.rest;
+import static org.junit.Assert.assertTrue;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
+
+import java.io.IOException;
//import org.glassfish.jersey.server.ResourceConfig;
//import org.glassfish.jersey.test.JerseyTest;
import org.json.simple.JSONObject;
@@ -36,22 +43,6 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Application;
-import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
-
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
-import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
diff --git a/src/test/java/org/onap/aai/sa/rest/DocumentSchemaTest.java b/src/test/java/org/onap/aai/sa/rest/DocumentSchemaTest.java
index ab1d293..44ed60c 100644
--- a/src/test/java/org/onap/aai/sa/rest/DocumentSchemaTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/DocumentSchemaTest.java
@@ -20,18 +20,14 @@
*/
package org.onap.aai.sa.rest;
+import static org.junit.Assert.assertTrue;
+
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.rest.DocumentSchema;
-
-import java.io.BufferedReader;
import java.io.File;
-import java.io.FileReader;
import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
public class DocumentSchemaTest {
diff --git a/src/test/java/org/onap/aai/sa/rest/DocumentTest.java b/src/test/java/org/onap/aai/sa/rest/DocumentTest.java
index 83ba5a7..efff07b 100644
--- a/src/test/java/org/onap/aai/sa/rest/DocumentTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/DocumentTest.java
@@ -21,6 +21,10 @@
package org.onap.aai.sa.rest;
import com.fasterxml.jackson.core.JsonProcessingException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+// import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MultivaluedMap;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
@@ -36,15 +40,10 @@ import org.onap.aai.sa.searchdbabstraction.entity.DocumentOperationResult;
import org.onap.aai.sa.searchdbabstraction.entity.ErrorResult;
import org.onap.aai.sa.searchdbabstraction.entity.SearchHits;
import org.onap.aai.sa.searchdbabstraction.entity.SearchOperationResult;
+import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-// import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MultivaluedMap;
-import org.springframework.http.HttpHeaders;
-
public class DocumentTest {
diff --git a/src/test/java/org/onap/aai/sa/rest/IndexApiTest.java b/src/test/java/org/onap/aai/sa/rest/IndexApiTest.java
index 60e798a..0f5932b 100644
--- a/src/test/java/org/onap/aai/sa/rest/IndexApiTest.java
+++ b/src/test/java/org/onap/aai/sa/rest/IndexApiTest.java
@@ -21,6 +21,14 @@
package org.onap.aai.sa.rest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
import org.junit.Before;
// import org.glassfish.jersey.server.ResourceConfig;
// import org.glassfish.jersey.test.JerseyTest;
@@ -37,15 +45,6 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
-
//import javax.ws.rs.core.Application;
//import javax.ws.rs.core.Response;
diff --git a/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java b/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java
index 854c061..0621cd8 100644
--- a/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java
+++ b/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java
@@ -20,13 +20,17 @@
*/
package org.onap.aai.sa.rest;
- import org.springframework.http.HttpHeaders;
+ import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
@Component
@RestController
diff --git a/src/test/java/org/onap/aai/sa/rest/StubEsController.java b/src/test/java/org/onap/aai/sa/rest/StubEsController.java
index 8cd25a6..0472283 100644
--- a/src/test/java/org/onap/aai/sa/rest/StubEsController.java
+++ b/src/test/java/org/onap/aai/sa/rest/StubEsController.java
@@ -20,20 +20,20 @@
*/
package org.onap.aai.sa.rest;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import org.json.simple.JSONObject;
-import org.onap.aai.sa.rest.AnalysisConfiguration;
-import org.onap.aai.sa.rest.BulkRequest;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreDataEntity;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreInterface;
import org.onap.aai.sa.searchdbabstraction.elasticsearch.exception.DocumentStoreOperationException;
-import org.onap.aai.sa.searchdbabstraction.entity.*;
-import org.onap.aai.sa.searchdbabstraction.util.DocumentSchemaUtil;
import org.onap.aai.sa.searchdbabstraction.entity.Document;
-import org.onap.aai.sa.rest.DocumentSchema;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
+import org.onap.aai.sa.searchdbabstraction.entity.DocumentOperationResult;
+import org.onap.aai.sa.searchdbabstraction.entity.OperationResult;
+import org.onap.aai.sa.searchdbabstraction.entity.SearchHit;
+import org.onap.aai.sa.searchdbabstraction.entity.SearchHits;
+import org.onap.aai.sa.searchdbabstraction.entity.SearchOperationResult;
+import org.onap.aai.sa.searchdbabstraction.util.DocumentSchemaUtil;
/**
* This class implements a stubbed version of the document store DAO so
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfigTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfigTest.java
index eb65a82..8c4de81 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfigTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfigTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.elasticsearch.config;
+import java.util.Properties;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Properties;
public class ElasticSearchConfigTest {
@Autowired
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatementTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatementTest.java
index 6e80e37..495a456 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatementTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationStatementTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.AggregationStatement;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class AggregationStatementTest {
private static ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationTest.java
index aee3ab2..d85e075 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/AggregationTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.Aggregation;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class AggregationTest {
private static ObjectMapper mapper = new ObjectMapper();
//
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateHistogramAggregationTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateHistogramAggregationTest.java
index 4d60e58..6a3ecf7 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateHistogramAggregationTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateHistogramAggregationTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.DateHistogramAggregation;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class DateHistogramAggregationTest {
ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeAggregationTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeAggregationTest.java
index 4b6c221..3183687 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeAggregationTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeAggregationTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.DateRangeAggregation;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class DateRangeAggregationTest {
private static ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeTest.java
index d89347a..52880c0 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/DateRangeTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.DateRange;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class DateRangeTest {
private static ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java
index 18a58cb..7b7abd0 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java
@@ -23,10 +23,8 @@ package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.Filter;
-
import java.io.IOException;
+import org.junit.Test;
public class FilterTest {
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/GroupByAggregationTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/GroupByAggregationTest.java
index 35dd18f..be50243 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/GroupByAggregationTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/GroupByAggregationTest.java
@@ -20,13 +20,12 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.GroupByAggregation;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
public class GroupByAggregationTest {
private static ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/QueryTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/QueryTest.java
index 183317a..0e60649 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/QueryTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/QueryTest.java
@@ -20,18 +20,14 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.ParsedQuery;
-import org.onap.aai.sa.searchdbabstraction.searchapi.RangeQuery;
-import org.onap.aai.sa.searchdbabstraction.searchapi.TermQuery;
-
import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
public class QueryTest {
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/RangeQueryTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/RangeQueryTest.java
index ab4d5b9..a06a2a0 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/RangeQueryTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/RangeQueryTest.java
@@ -21,14 +21,12 @@
package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.File;
+import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
import org.onap.aai.sa.rest.TestUtils;
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-
public class RangeQueryTest {
@Test(expected=IllegalArgumentException.class)
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatementTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatementTest.java
index 81bf0eb..03cf238 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatementTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SearchStatementTest.java
@@ -20,19 +20,19 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.rest.TestUtils;
-import org.onap.aai.sa.searchdbabstraction.searchapi.Aggregation;
-import org.onap.aai.sa.searchdbabstraction.searchapi.QueryStatement;
-import org.onap.aai.sa.searchdbabstraction.searchapi.SearchStatement;
-
import java.io.File;
import java.io.IOException;
-
-import static org.junit.Assert.*;
+import org.junit.Test;
+import org.onap.aai.sa.rest.TestUtils;
public class SearchStatementTest {
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SortTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SortTest.java
index 2d84a00..9b93a25 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SortTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/SortTest.java
@@ -20,15 +20,13 @@
*/
package org.onap.aai.sa.searchdbabstraction.searchapi;
+import static org.junit.Assert.assertTrue;
+
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.Sort;
-
import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
public class SortTest {
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQueryTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQueryTest.java
index 50b97e4..403ad6e 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQueryTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/TermQueryTest.java
@@ -21,11 +21,10 @@
package org.onap.aai.sa.searchdbabstraction.searchapi;
import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
-import java.io.IOException;
-
public class TermQueryTest {
@Test
diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslatorTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslatorTest.java
index ba5cb48..40209d6 100644
--- a/src/test/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslatorTest.java
+++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/util/ElasticSearchPayloadTranslatorTest.java
@@ -20,16 +20,14 @@
*/
package org.onap.aai.sa.searchdbabstraction.util;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
-
import org.apache.commons.io.IOUtils;
import org.junit.Before;
import org.junit.Test;
-import org.onap.aai.sa.rest.TestUtils;
public class ElasticSearchPayloadTranslatorTest {