import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.net.Inet4Address;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
* <br/>
* <p>
* </p>
- *
+ *
* @author
* @version Aug 9, 2016
*/
protected HttpClient client = null;
- private static final String LOCAL_HOST = "127.0.0.1";
+ private static final String LOCAL_HOST = Inet4Address.getLoopbackAddress().getHostAddress();
static final String HTTP_PATCH = "PATCH";
* Constructor<br/>
* <p>
* </p>
- *
+ *
* @since
*/
public HttpBaseRest() {
/**
* <br/>
- *
+ *
* @param method
* @param servicePath
* @param restParametes
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import java.net.Inet4Address;
+
import org.junit.Test;
import org.onap.vfc.nfvo.multivimproxy.common.util.restclient.RestfulOptions;
import org.onap.vfc.nfvo.multivimproxy.common.util.restclient.RestfulParametes;
};
}
+
+ @Test
+ public void findLocalAddress() {
+ assertEquals("127.0.0.1", Inet4Address.getLoopbackAddress().getHostAddress());
+ }
+
private void mockGetResponseContentReturnNull() {
new MockUp<RestfulUtil>() {