regression unit test for getServicesByProjectNames
[vid.git] / vid-app-common / src / main / java / org / onap / vid / aai / AaiClient.java
index 1594010..7816446 100644 (file)
@@ -143,13 +143,13 @@ public class AaiClient implements AaiClientInterface {
     }
 
     @Override
-    public AaiResponse getServicesByOwningEntityId(List<String> owningEntityIds){
+    public AaiResponse<OwningEntityResponse> getServicesByOwningEntityId(List<String> owningEntityIds){
         Response resp = doAaiGet(getUrlFromLIst("business/owning-entities?", "owning-entity-id=", owningEntityIds), false);
         return processAaiResponse(resp, OwningEntityResponse.class, null);
     }
 
     @Override
-    public AaiResponse getServicesByProjectNames(List<String> projectNames){
+    public AaiResponse<ProjectResponse> getServicesByProjectNames(List<String> projectNames){
         Response resp = doAaiGet(getUrlFromLIst("business/projects?", "project-name=",  projectNames), false);
         return processAaiResponse(resp, ProjectResponse.class, null);
     }
@@ -528,9 +528,9 @@ public class AaiClient implements AaiClientInterface {
     }
 
     @Override
-    public AaiResponse getSubscriberData(String subscriberId, boolean omitServiceInstances) {
+    public AaiResponse<Services> getSubscriberData(String subscriberId, boolean omitServiceInstances) {
         String depth = omitServiceInstances ? "1" : "2";
-        AaiResponse subscriberDataResponse;
+        AaiResponse<Services> subscriberDataResponse;
         Response resp = doAaiGet(BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth, false);
         subscriberDataResponse = processAaiResponse(resp, Services.class, null);
         return subscriberDataResponse;
@@ -617,7 +617,7 @@ public class AaiClient implements AaiClientInterface {
         }
     }
 
-    private AaiResponse processAaiResponse(Response resp, Class classType, String responseBody) {
+    private <T> AaiResponse<T> processAaiResponse(Response resp, Class<? extends T> classType, String responseBody) {
         return processAaiResponse(resp, classType, responseBody, VidObjectMapperType.CODEHAUS);
     }