Refactor AaiClient API - package restructure
- Reorganized aaiclient related classes between api/impl/main packages
Issue-ID: DCAEGEN2-1955
Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
Change-Id: Ie68f74cd94a6de0806c192046c1746af25979170
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java
index d05edf4..3936932 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java
@@ -22,17 +22,17 @@
import java.nio.charset.StandardCharsets;
import java.util.function.BiFunction;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiGetServiceInstanceClient;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpGetClient;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpPatchClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiPnfResultModel;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceResultModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiGetServiceInstanceClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiHttpGetClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiHttpPatchClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiJsonBodyBuilderImpl;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory;
-import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl;
-import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel;
-import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClient;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
index 11939b5..f98e952 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
@@ -20,24 +20,6 @@
package org.onap.dcaegen2.services.prh.service;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import io.vavr.collection.List;
-import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
-import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterSubscribeResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-import org.springframework.util.StringUtils;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-import java.util.Optional;
-import java.util.stream.StreamSupport;
-
import static org.onap.dcaegen2.services.prh.service.PnfRegistrationFields.ADDITIONAL_FIELDS;
import static org.onap.dcaegen2.services.prh.service.PnfRegistrationFields.COMMON_EVENT_HEADER;
import static org.onap.dcaegen2.services.prh.service.PnfRegistrationFields.COMMON_FORMAT_FOR_JSON_OBJECT;
@@ -55,6 +37,23 @@
import static org.onap.dcaegen2.services.prh.service.PnfRegistrationFields.SOURCE_NAME;
import static org.onap.dcaegen2.services.prh.service.PnfRegistrationFields.SW_VERSION;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import io.vavr.collection.List;
+import java.util.Optional;
+import java.util.stream.StreamSupport;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
+import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterSubscribeResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 5/8/18
@@ -76,7 +75,7 @@
private JsonObject pnfAdditionalFields;
/**
- * Extract info from string and create @see {@link org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel}.
+ * Extract info from string and create @see {@link ConsumerDmaapModel}.
*
* @param monoMessage - results from DMaaP
* @return reactive DMaaPModel
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTask.java
index 123eb5a..35eb948 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTask.java
@@ -20,8 +20,8 @@
package org.onap.dcaegen2.services.prh.tasks;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import reactor.core.publisher.Mono;
@FunctionalInterface
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java
index fd7f11c..21c5b54 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java
@@ -21,10 +21,10 @@
package org.onap.dcaegen2.services.prh.tasks;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.exceptions.AaiNotFoundException;
import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.model.utils.HttpUtils;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.slf4j.Logger;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java
index b4ab10f..11ff369 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java
@@ -20,7 +20,7 @@
package org.onap.dcaegen2.services.prh.tasks;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import reactor.core.publisher.Mono;
@FunctionalInterface
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java
index 23cd2dd..3db4887 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java
@@ -24,11 +24,11 @@
import java.util.Optional;
import java.util.stream.Stream;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiPnfResultModel;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceResultModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableAaiServiceInstanceQueryModel;
-import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel;
-import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.model.Relationship;
import org.onap.dcaegen2.services.prh.model.RelationshipData;
import org.onap.dcaegen2.services.prh.model.RelationshipDict;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTask.java
index 12e1314..5700c2f 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTask.java
@@ -20,7 +20,7 @@
package org.onap.dcaegen2.services.prh.tasks;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import reactor.core.publisher.Mono;
@FunctionalInterface
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
index 8b89321..201f1bc 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
@@ -30,10 +30,10 @@
import com.google.gson.JsonObject;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiPnfResultModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.configuration.Config;
import org.onap.dcaegen2.services.prh.exceptions.AaiFailureException;
-import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.model.ImmutableRelationshipDict;
import org.onap.dcaegen2.services.prh.model.Relationship;
import org.onap.dcaegen2.services.prh.model.RelationshipDict;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
index 2deafd8..52bdfac 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
@@ -20,7 +20,7 @@
package org.onap.dcaegen2.services.prh.tasks;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import reactor.core.publisher.Flux;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
index a990e50..4ebfa2c 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
@@ -20,8 +20,8 @@
package org.onap.dcaegen2.services.prh.tasks;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.configuration.Config;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.service.DmaapConsumerJsonParser;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterSubscriber;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterSubscribeRequest;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
index 0cdc40e..ef79f9c 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
@@ -20,8 +20,8 @@
package org.onap.dcaegen2.services.prh.tasks;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishResponse;
import reactor.core.publisher.Flux;
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
index 2890d19..9769a2c 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
@@ -20,9 +20,10 @@
package org.onap.dcaegen2.services.prh.tasks;
+import java.util.function.Supplier;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.PnfReadyJsonBodyBuilder;
import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.PnfReadyJsonBodyBuilder;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterPublisher;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishRequest;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishResponse;
@@ -30,8 +31,6 @@
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Flux;
-import java.util.function.Supplier;
-
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18
*/
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
index 0d26800..68a44eb 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
@@ -20,9 +20,16 @@
package org.onap.dcaegen2.services.prh.tasks;
+import static org.onap.dcaegen2.services.sdk.rest.services.model.logging.MdcVariables.INSTANCE_UUID;
+import static org.onap.dcaegen2.services.sdk.rest.services.model.logging.MdcVariables.RESPONSE_CODE;
+
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+import java.util.function.Predicate;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.exceptions.DmaapEmptyResponseException;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishResponse;
import org.onap.dcaegen2.services.sdk.rest.services.model.logging.MdcVariables;
import org.slf4j.Logger;
@@ -37,14 +44,6 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.CountDownLatch;
-import java.util.function.Predicate;
-
-import static org.onap.dcaegen2.services.sdk.rest.services.model.logging.MdcVariables.INSTANCE_UUID;
-import static org.onap.dcaegen2.services.sdk.rest.services.model.logging.MdcVariables.RESPONSE_CODE;
-
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
*/
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParserTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParserTest.java
index 342460e..9dab7aa 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParserTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParserTest.java
@@ -20,24 +20,23 @@
package org.onap.dcaegen2.services.prh.service;
+import static org.mockito.Mockito.spy;
+
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.vavr.collection.List;
+import java.util.Optional;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.ImmutableMessageRouterSubscribeResponse;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterSubscribeResponse;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
-import java.util.Optional;
-
-import static org.mockito.Mockito.spy;
-
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 5/8/18
*/
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
index 075cdad..17936ae 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
@@ -37,12 +37,12 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.onap.dcaegen2.services.prh.TestAppConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpPatchClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiHttpPatchClient;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.configuration.CbsConfiguration;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java
index 3eb883f..e81b374 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java
@@ -34,10 +34,10 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiPnfResultModel;
import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel;
-import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel;
-import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceResultModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.model.ImmutableRelationshipData;
import org.onap.dcaegen2.services.prh.model.Relationship;
import org.onap.dcaegen2.services.prh.model.RelationshipData;
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
index fe45262..bc754bf 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
@@ -44,11 +44,11 @@
import org.mockito.ArgumentCaptor;
import org.mockito.ArgumentMatchers;
import org.onap.dcaegen2.services.prh.TestAppConfiguration;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.configuration.CbsConfiguration;
import org.onap.dcaegen2.services.prh.exceptions.AaiFailureException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.ImmutableHttpResponse;
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImplTest.java
index 7e00a44..3741415 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImplTest.java
@@ -20,6 +20,10 @@
package org.onap.dcaegen2.services.prh.tasks;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
+
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import org.junit.jupiter.api.Test;
@@ -29,9 +33,9 @@
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.model.streams.dmaap.ImmutableMessageRouterSink;
import org.onap.dcaegen2.services.sdk.model.streams.dmaap.MessageRouterSink;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterPublisher;
@@ -40,10 +44,6 @@
import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.verify;
-
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 5/17/18
*/
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasksTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasksTest.java
index 346421e..c067cdb 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasksTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasksTest.java
@@ -19,27 +19,26 @@
*/
package org.onap.dcaegen2.services.prh.tasks;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-import javax.net.ssl.SSLException;
-import java.util.Collections;
-import java.util.Map;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
+import java.util.Collections;
+import java.util.Map;
+import javax.net.ssl.SSLException;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
@ExtendWith(MockitoExtension.class)
class ScheduledTasksTest {
private final static ConsumerDmaapModel DMAAP_MODEL =
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModel.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModel.java
similarity index 96%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModel.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModel.java
index 424d7f8..cae6385 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModel.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModel.java
@@ -18,11 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import com.google.gson.annotations.SerializedName;
import org.immutables.gson.Gson;
import org.immutables.value.Value;
+import org.onap.dcaegen2.services.prh.model.ImmutableRelationship;
+import org.onap.dcaegen2.services.prh.model.Relationship;
import org.springframework.lang.Nullable;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModel.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModel.java
similarity index 96%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModel.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModel.java
index 67d6ff9..f74c1a5 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModel.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModel.java
@@ -18,11 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import com.google.gson.annotations.SerializedName;
import org.immutables.gson.Gson;
import org.immutables.value.Value;
+import org.onap.dcaegen2.services.prh.model.ImmutableRelationship;
+import org.onap.dcaegen2.services.prh.model.Relationship;
import org.springframework.lang.Nullable;
@Value.Immutable
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/ConsumerDmaapModel.java
similarity index 97%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/ConsumerDmaapModel.java
index 9ed3682..4d417a5 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/ConsumerDmaapModel.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
similarity index 93%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
index c41bb90..26fb849 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.apache.commons.text.StringSubstitutor;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClient.java
similarity index 92%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClient.java
index d50344e..2ae2808 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClient.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.ImmutableHttpRequest;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClient.java
similarity index 93%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClient.java
index ab1066a..38ee680 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClient.java
@@ -18,15 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.ImmutableHttpRequest;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderImpl.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderImpl.java
similarity index 88%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderImpl.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderImpl.java
index 43e4ebb..21277e8 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderImpl.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderImpl.java
@@ -18,12 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapterFactory;
import java.util.ServiceLoader;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel.Builder;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel.Builder;
import org.springframework.util.StringUtils;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilder.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilder.java
similarity index 85%
rename from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilder.java
rename to prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilder.java
index b39c469..3088226 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilder.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilder.java
@@ -18,11 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
-import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel.Builder;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel.Builder;
import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModelTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModelTest.java
similarity index 95%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModelTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModelTest.java
index 3f396e8..aa193e8 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiPnfResultModelTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiPnfResultModelTest.java
@@ -18,17 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
-
-import com.google.gson.Gson;
-import org.junit.jupiter.api.Test;
-import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
-
-import java.io.InputStreamReader;
-import java.util.Objects;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.assertj.core.api.Assertions.assertThat;
+import com.google.gson.Gson;
+import java.io.InputStreamReader;
+import java.util.Objects;
+import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.model.RelationshipData;
+import org.onap.dcaegen2.services.prh.model.RelationshipDict;
+import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
+
class AaiPnfResultModelTest {
@Test
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModelTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModelTest.java
similarity index 96%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModelTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModelTest.java
index 5f9ca14..278e8b5 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiServiceInstanceResultModelTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceResultModelTest.java
@@ -18,17 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
-
-import com.google.gson.Gson;
-import org.junit.jupiter.api.Test;
-import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
-
-import java.io.InputStreamReader;
-import java.util.Objects;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.assertj.core.api.Assertions.assertThat;
+import com.google.gson.Gson;
+import java.io.InputStreamReader;
+import java.util.Objects;
+import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.model.RelationshipData;
+import org.onap.dcaegen2.services.prh.model.RelationshipDict;
+import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder;
+
class AaiServiceInstanceResultModelTest {
@Test
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiClientConfigurations.java
similarity index 97%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiClientConfigurations.java
index ab29e02..fa04804 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiClientConfigurations.java
@@ -17,7 +17,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import java.util.HashMap;
import java.util.Map;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClientTest.java
similarity index 91%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClientTest.java
index 551f93f..9c7ce60 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClientTest.java
@@ -17,18 +17,19 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClientTest.java
similarity index 94%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClientTest.java
index f69fca5..a751584 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpGetClientTest.java
@@ -17,13 +17,13 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClientTest.java
similarity index 95%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClientTest.java
index de53d4d..18e235d 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiHttpPatchClientTest.java
@@ -17,14 +17,14 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.impl.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderTest.java
similarity index 94%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderTest.java
index 60ce520..de0a2cf 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/AaiJsonBodyBuilderTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiJsonBodyBuilderTest.java
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
class AaiJsonBodyBuilderTest {
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AbstractHttpClientTest.java
similarity index 90%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AbstractHttpClientTest.java
index 1ccb8cb..fe90888 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AbstractHttpClientTest.java
@@ -17,13 +17,12 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.mockito.Mockito.mock;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl;
-import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClient;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilderTest.java
similarity index 93%
rename from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java
rename to prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilderTest.java
index 769e167..5c3d9e0 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/PnfReadyJsonBodyBuilderTest.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.impl;
import static org.junit.jupiter.api.Assertions.assertEquals;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableConsumerDmaapModel;
class PnfReadyJsonBodyBuilderTest {