/*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.distribution.main.rest;
 
 import org.onap.policy.common.endpoints.report.HealthCheckReport;
+import org.onap.policy.common.utils.network.NetworkUtil;
 import org.onap.policy.distribution.main.startstop.DistributionActivator;
 
 /**
 
     private static final String NOT_ALIVE = "not alive";
     private static final String ALIVE = "alive";
-    private static final String URL = "self";
+    private static final String URL = NetworkUtil.getHostname();
     private static final String NAME = "Policy SSD";
 
     /**
 
  *  Copyright (C) 2018 Ericsson. All rights reserved.
  *  Copyright (C) 2019 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ *  Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
     private static final Logger LOGGER = LoggerFactory.getLogger(TestDistributionRestServer.class);
     private static final String NOT_ALIVE = "not alive";
     private static final String ALIVE = "alive";
-    private static final String SELF = "self";
+    private static final String SELF = NetworkUtil.getHostname();
     private static final String NAME = "Policy SSD";
 
     @Test
     public void testHealthCheckSuccess() {
-        final String reportString = "Report [name=Policy SSD, url=self, healthy=true, code=200, message=alive]";
+        final String reportString = "Report [name=Policy SSD, url=" + SELF + ", healthy=true, code=200, message=alive]";
         try {
             final Main main = startDistributionService();
             final HealthCheckReport report = performHealthCheck();
 
     @Test
     public void testHealthCheckFailure() {
-        final String reportString = "Report [name=Policy SSD, url=self, healthy=false, code=500, message=not alive]";
+        final String reportString =
+                "Report [name=Policy SSD, url=" + SELF + ", healthy=false, code=500, message=not alive]";
         final RestServerParameters restServerParams = new CommonTestData().getRestServerParameters(false);
         restServerParams.setName(CommonTestData.DISTRIBUTION_GROUP_NAME);
         final RestServer restServer = new RestServer(restServerParams, null, DistributionRestController.class);
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Intel. All rights reserved.
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
     private static final Logger LOGGER = LoggerFactory.getLogger(TestHttpsDistributionRestServer.class);
     private static final String ALIVE = "alive";
-    private static final String SELF = "self";
+    private static final String SELF = NetworkUtil.getHostname();
     private static final String NAME = "Policy SSD";
     private static String KEYSTORE = System.getProperty("user.dir") + "/src/test/resources/ssl/policy-keystore";
 
     @Test
     public void testHttpsHealthCheckSuccess() {
-        final String reportString = "Report [name=Policy SSD, url=self, healthy=true, code=200, message=alive]";
+        final String reportString = "Report [name=Policy SSD, url=" + SELF + ", healthy=true, code=200, message=alive]";
         try {
             final Main main = startDistributionService();
             final HealthCheckReport report = performHealthCheck();