Add test case for RestUtil.java
[sdc.git] / common-app-api / src / test / java / org / openecomp / sdc / common / http / client / api / RestUtilsTest.java
1 package org.openecomp.sdc.common.http.client.api;
2
3 import org.apache.http.HttpHeaders;
4 import org.junit.Test;
5
6 import static org.junit.Assert.*;
7
8 import org.openecomp.sdc.common.http.client.api.*;
9
10 import java.util.Properties;
11
12 public class RestUtilsTest {
13
14     @Test
15     public void addBasicAuthHeader() {
16         Properties headers = new Properties();
17         RestUtils restutil = new RestUtils();
18         restutil.addBasicAuthHeader(headers,"uname","passwd");
19         assertEquals(headers.getProperty(HttpHeaders.AUTHORIZATION),"Basic dW5hbWU6cGFzc3dk");
20     }
21 }