Removing Unnecessary Maven Dependencies

Issue-ID: CCSDK-3919
Change-Id: I58a94dbf660f867998d1208a5fdcb2872c1b5db2
Signed-off-by: ambrishest <ambrish.singh@est.tech>
diff --git a/a1-policy-management/pom.xml b/a1-policy-management/pom.xml
index 338477b..8cac379 100644
--- a/a1-policy-management/pom.xml
+++ b/a1-policy-management/pom.xml
@@ -213,16 +213,6 @@
             <artifactId>everit-json-schema</artifactId>
             <version>1.14.0</version>
         </dependency>
-        <dependency>
-           <groupId>org.codehaus.httpcache4j.uribuilder</groupId>
-           <artifactId>uribuilder</artifactId>
-           <version>2.0.0</version>
-       </dependency>
-       <dependency>
-           <groupId>org.apache.httpcomponents</groupId>
-           <artifactId>httpclient</artifactId>
-           <version>4.5.13</version>
-       </dependency>
     </dependencies>
     <build>
         <plugins>
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/OscA1Client.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/OscA1Client.java
index f2a79cd..eac79ad 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/OscA1Client.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/OscA1Client.java
@@ -21,6 +21,9 @@
 package org.onap.ccsdk.oran.a1policymanagementservice.clients;
 
 import java.lang.invoke.MethodHandles;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.Set;
 
@@ -32,7 +35,6 @@
 
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
-import org.apache.http.client.utils.URIBuilder;
 /**
  * Client for accessing OSC A1 REST API
  */
@@ -99,22 +101,22 @@
         /**
          * ​/a1-p​/policytypes​/{policy_type_id}​/policies​/{policy_instance_id}
          */
-	private String createPolicyUri(String type, String id, String notificationDestination) {
-               String url = "";
-               URIBuilder ub = null;
-               try {
-                    ub = new URIBuilder(createPolicyTypeUri(type) + "/policies/" + id);
-                    if(notificationDestination != null) {
-                       ub.addParameter("notificationDestination", notificationDestination);
-                    }
-                    url = ub.toString();
-               }
-               catch(Exception e) {
-                    String exceptionString = e.toString();
-                    logger.error("Unexpected error in policy URI creation for policy type: {}, exception: {}", type, exceptionString);
-               }
-               return url;
-         }
+        private String createPolicyUri(String type, String id, String notificationDestination) {
+            try {
+                String baseUrl = createPolicyTypeUri(type);
+                String url = baseUrl + "/policies/" + id;
+                if (notificationDestination != null) {
+                    url += "?notificationDestination=" +
+                        URLEncoder.encode(notificationDestination, StandardCharsets.UTF_8.toString());
+                }
+                return new URI(url).toString();
+            } catch (Exception e) {
+                String exceptionString = e.getMessage();
+                logger.error("Unexpected error in policy URI creation for policy type: {}, exception: {}", type,
+                    exceptionString);
+                return "";
+            }
+        }
 
         /**
          * /a1-p/policytypes/{policy_type_id}