aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'common-app-api/src/test/java')
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/http/client/api/RestUtilsTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/http/client/api/RestUtilsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/http/client/api/RestUtilsTest.java
new file mode 100644
index 0000000000..816a057fa2
--- /dev/null
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/http/client/api/RestUtilsTest.java
@@ -0,0 +1,21 @@
+package org.openecomp.sdc.common.http.client.api;
+
+import org.apache.http.HttpHeaders;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import org.openecomp.sdc.common.http.client.api.*;
+
+import java.util.Properties;
+
+public class RestUtilsTest {
+
+ @Test
+ public void addBasicAuthHeader() {
+ Properties headers = new Properties();
+ RestUtils restutil = new RestUtils();
+ restutil.addBasicAuthHeader(headers,"uname","passwd");
+ assertEquals(headers.getProperty(HttpHeaders.AUTHORIZATION),"Basic dW5hbWU6cGFzc3dk");
+ }
+} \ No newline at end of file