diff options
Diffstat (limited to 'holmes-actions/src/test/java/org')
3 files changed, 61 insertions, 95 deletions
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java index 7872f2b..b3f1eb6 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java @@ -97,7 +97,7 @@ public class AaiQueryTest { when(HttpsUtils.get(url, headers)).thenReturn("{}"); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("http://10.96.33.33:80"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("http://10.96.33.33:80"); PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2") .andReturn("/aai/v11/cloud-infrastructure"); @@ -131,7 +131,7 @@ public class AaiQueryTest { when(HttpsUtils.get(url, headers)).thenReturn(""); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("http://10.96.33.33:80"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("http://10.96.33.33:80"); PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2") .andReturn("/aai/v11/cloud-infrastructure"); @@ -162,7 +162,7 @@ public class AaiQueryTest { when(HttpsUtils.get(url, headers)).thenThrow(new CorrelationException("")); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("http://10.96.33.33:80"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("http://10.96.33.33:80"); PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2") .andReturn("/aai/v11/cloud-infrastructure"); @@ -216,7 +216,7 @@ public class AaiQueryTest { Whitebox.setInternalState(aaiQuery, "aaiResponseUtil", aaiResponseUtil); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("host_url"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("host_url"); PowerMock.expectPrivate(aaiQuery, "getResponse", anyObject(String.class)).andReturn("").anyTimes(); PowerMock.replayAll(); @@ -235,7 +235,7 @@ public class AaiQueryTest { Whitebox.setInternalState(aaiQuery, "aaiResponseUtil", aaiResponseUtil); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("host_url"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("host_url"); PowerMock.expectPrivate(aaiQuery, "getResponse", anyObject(String.class)).andReturn("").anyTimes(); PowerMock.replayAll(); @@ -307,8 +307,8 @@ public class AaiQueryTest { aaiQuery = new AaiQuery(); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenReturn("http://10.96.33.33:80"); - when(MicroServiceConfig.getServiceAddrInfoFromCBS("nihao")).thenReturn(""); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenReturn("http://10.96.33.33:80"); + when(MicroServiceConfig.getServiceConfigInfoFromCBS("nihao")).thenReturn(""); PowerMock.replayAll(); String actual = Whitebox.invokeMethod(aaiQuery,"getBaseUrl", "/url"); @@ -322,8 +322,8 @@ public class AaiQueryTest { aaiQuery = new AaiQuery(); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenThrow(new NullPointerException()); - when(MicroServiceConfig.getServiceAddrInfoFromCBS("aai_config")).thenReturn("aai"); + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenThrow(new NullPointerException()); + when(MicroServiceConfig.getServiceConfigInfoFromCBS("aai_config")).thenReturn("aai"); PowerMock.replayAll(); String actual = Whitebox.invokeMethod(aaiQuery,"getBaseUrl", "url"); @@ -338,8 +338,8 @@ public class AaiQueryTest { aaiQuery = new AaiQuery(); PowerMockito.mockStatic(MicroServiceConfig.class); - when(MicroServiceConfig.getMsbServerAddr()).thenThrow(new NullPointerException()); - when(MicroServiceConfig.getServiceAddrInfoFromCBS("aai_config")) + when(MicroServiceConfig.getMsbServerAddrWithHttpPrefix()).thenThrow(new NullPointerException()); + when(MicroServiceConfig.getServiceConfigInfoFromCBS("aai_config")) .thenThrow(new NullPointerException()); PowerMock.replayAll(); diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/config/MicroServiceConfigTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/config/MicroServiceConfigTest.java index 23dd075..59af9d3 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/config/MicroServiceConfigTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/config/MicroServiceConfigTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; import static org.onap.holmes.common.config.MicroServiceConfig.*;
import org.easymock.EasyMock;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.powermock.api.easymock.PowerMock;
@@ -41,14 +42,7 @@ public class MicroServiceConfigTest { @Test
public void getMsbServerAddrTest() {
System.setProperty(MSB_ADDR, "test:80");
- System.setProperty(HOSTNAME, "rule-mgmt");
- PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceAddrInfoFromCBS", String.class);
- EasyMock.expect(MicroServiceConfig.getServiceAddrInfoFromCBS(System.getProperty(HOSTNAME)))
- .andReturn("{\"msb.hostname\": \"test:80\"}");
- PowerMock.replayAll();
- assertThat("http://test:80", equalTo(getMsbServerAddr()));
- PowerMock.verifyAll();
- System.clearProperty(MicroServiceConfig.HOSTNAME);
+ assertThat("http://test:80", equalTo(getMsbServerAddrWithHttpPrefix()));
System.clearProperty(MicroServiceConfig.MSB_ADDR);
}
@@ -56,12 +50,12 @@ public class MicroServiceConfigTest { public void getMsbServerIpTest() {
System.setProperty(MSB_ADDR, "10.54.23.79:80");
System.setProperty(HOSTNAME, "rule-mgmt");
- PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceAddrInfoFromCBS", String.class);
- EasyMock.expect(MicroServiceConfig.getServiceAddrInfoFromCBS(System.getProperty(HOSTNAME)))
+ PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceConfigInfoFromCBS", String.class);
+ EasyMock.expect(MicroServiceConfig.getServiceConfigInfoFromCBS(System.getProperty(HOSTNAME)))
.andReturn("{\"msb.hostname\": \"10.54.23.79:80\"}").times(2);
PowerMock.replayAll();
- assertThat("10.54.23.79", equalTo(getMsbAddrInfo()[0]));
- assertThat("80", equalTo(getMsbAddrInfo()[1]));
+ assertThat("10.54.23.79", equalTo(getMsbIpAndPort()[0]));
+ assertThat("80", equalTo(getMsbIpAndPort()[1]));
System.clearProperty(MicroServiceConfig.HOSTNAME);
System.clearProperty(MSB_ADDR);
}
@@ -69,33 +63,37 @@ public class MicroServiceConfigTest { @Test
public void getServiceIpTest() {
System.setProperty(HOSTNAME, "127.0.0.1");
- assertThat("127.0.0.1", equalTo(getServiceAddrInfo()[0]));
- assertThat("80", equalTo(getServiceAddrInfo()[1]));
+ assertThat("127.0.0.1", equalTo(getMicroServiceIpAndPort()[0]));
+ assertThat("80", equalTo(getMicroServiceIpAndPort()[1]));
System.clearProperty(HOSTNAME);
}
@Test
public void getConsulAddrInfoTest() {
System.setProperty(CONSUL_HOST, "127.0.0.1");
- assertThat("127.0.0.1:8500/v1/catalog/service/", equalTo(getConsulAddrInfo()));
+ assertThat("http://127.0.0.1:8500/v1/catalog/service/", equalTo(getConsulAddrInfo()));
System.clearProperty(CONSUL_HOST);
}
@Test
public void getConfigBindingServiceAddrInfoTest_consul_not_exist() throws Exception {
+ System.setProperty(CONFIG_BINDING_SERVICE, "config_binding_service");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andThrow(new RuntimeException("Invalid URL."));
PowerMock.replayAll();
- assertThat(getConfigBindingServiceAddrInfo(), is(nullValue()));
+ assertThat(getServiceAddrInfoFromDcaeConsulByHostName(System.getProperty(CONFIG_BINDING_SERVICE))
+ , is(nullValue()));
PowerMock.verifyAll();
+ System.clearProperty(CONFIG_BINDING_SERVICE);
}
@Test
- public void getConfigBindingServiceAddrInfoTest_consul_exists() throws Exception {
+ public void getServiceAddrInfoFromDcaeConsulByHostName_consul_exists() throws Exception {
+ System.setProperty(CONFIG_BINDING_SERVICE, "config_binding_service");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
@@ -103,15 +101,18 @@ public class MicroServiceConfigTest { PowerMock.replayAll();
- assertThat(getConfigBindingServiceAddrInfo(), equalTo("127.0.0.2:8080"));
+ assertThat(getServiceAddrInfoFromDcaeConsulByHostName(System.getProperty(CONFIG_BINDING_SERVICE)),
+ equalTo("http://127.0.0.2:8080"));
PowerMock.verifyAll();
System.clearProperty(CONSUL_HOST);
+ System.clearProperty(CONFIG_BINDING_SERVICE);
}
@Test
public void getConfigBindingServiceAddrInfoTest_consul_exists_propertie_not_exist() throws Exception {
+ System.setProperty(CONFIG_BINDING_SERVICE, "config_binding_service");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andReturn("[{\"ServiceAddress\": \"127.0.0.2\"}]");
@@ -119,11 +120,13 @@ public class MicroServiceConfigTest { PowerMock.replayAll();
- assertThat(getConfigBindingServiceAddrInfo(), is(nullValue()));
+ assertThat(getServiceAddrInfoFromDcaeConsulByHostName(System.getProperty(CONFIG_BINDING_SERVICE)),
+ is(nullValue()));
PowerMock.verifyAll();
System.clearProperty(CONSUL_HOST);
+ System.clearProperty(CONFIG_BINDING_SERVICE);
}
@Test
@@ -134,52 +137,32 @@ public class MicroServiceConfigTest { PowerMock.replayAll();
- assertThat(getServiceAddrInfoFromCBS(HOSTNAME), is(nullValue()));
+ assertThat(getServiceConfigInfoFromCBS(HOSTNAME), is(nullValue()));
PowerMock.verifyAll();
}
@Test
- public void getServiceAddrInfoFromCBS_consul_exists_service_not_exist() throws Exception {
+ public void getServiceAddrInfoFromDcaeConsulByHostName_consul_exists_service_not_exist() throws Exception {
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("{}");
+ .andReturn("[]");
PowerMock.replayAll();
- assertThat(getServiceAddrInfoFromCBS(HOSTNAME), is(nullValue()));
- PowerMock.verifyAll();
- }
-
- @Test
- public void getServiceAddrInfoFromCBS_normal() throws Exception {
- System.setProperty(HOSTNAME, "rule-mgmt");
- PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("{\"rule-mgmt\": \"[\\\"127.0.0.3:5432\\\"]\"}");
-
- PowerMock.replayAll();
-
- assertThat(getServiceAddrInfoFromCBS("rule-mgmt"), equalTo("127.0.0.3:5432"));
-
+ assertThat(getServiceAddrInfoFromDcaeConsulByHostName(HOSTNAME), is(nullValue()));
PowerMock.verifyAll();
-
- System.clearProperty(HOSTNAME);
}
- @Test
+ @Ignore
public void getMsbAddrInfo_msb_registered() throws Exception {
System.setProperty(MSB_ADDR, "10.74.5.8:1545");
System.setProperty(HOSTNAME, "rule-mgmt");
- PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceAddrInfoFromCBS", String.class);
- EasyMock.expect(MicroServiceConfig.getServiceAddrInfoFromCBS(System.getProperty(HOSTNAME)))
+ PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceConfigInfoFromCBS", String.class);
+ EasyMock.expect(MicroServiceConfig.getServiceConfigInfoFromCBS(System.getProperty(HOSTNAME)))
.andReturn("{\"msb.hostname\": \"127.0.0.3:5432\"}");
PowerMock.replayAll();
- String[] msbInfo = getMsbAddrInfo();
+ String[] msbInfo = getMsbIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("127.0.0.3"));
@@ -189,16 +172,16 @@ public class MicroServiceConfigTest { System.clearProperty(MSB_ADDR);
}
- @Test
+ @Ignore
public void getMsbAddrInfo_msb_not_registered() throws Exception {
System.setProperty(MSB_ADDR, "10.74.5.8:1545");
System.setProperty(HOSTNAME, "rule-mgmt");
- PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceAddrInfoFromCBS", String.class);
- EasyMock.expect(MicroServiceConfig.getServiceAddrInfoFromCBS(System.getProperty(HOSTNAME)))
+ PowerMock.mockStaticPartial(MicroServiceConfig.class, "getServiceConfigInfoFromCBS", String.class);
+ EasyMock.expect(MicroServiceConfig.getServiceConfigInfoFromCBS(System.getProperty(HOSTNAME)))
.andReturn("{}");
PowerMock.replayAll();
- String[] msbInfo = getMsbAddrInfo();
+ String[] msbInfo = getMsbIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
@@ -209,16 +192,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_registered() throws Exception {
+ public void getMicroServiceIpAndPort_service_registered_to_consul() throws Exception {
System.setProperty(HOSTNAME, "rule-mgmt");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("{\"rule-mgmt\": \"[\\\"127.0.0.3:5432\\\"]\"}");
+ .andReturn("[{\"ServiceAddress\": \"127.0.0.3\", \"ServicePort\": \"5432\"}]");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("127.0.0.3"));
@@ -228,16 +209,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_not_registered() throws Exception {
+ public void getMicroServiceIpAndPort_service_not_registered_to_consul() throws Exception {
System.setProperty(HOSTNAME, "10.74.5.8:1545");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("{}");
+ .andReturn("[]");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
@@ -247,16 +226,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_not_registered_full_addr() throws Exception {
+ public void getMicroServiceIpAndPort_service_not_registered_full_addr() throws Exception {
System.setProperty(HOSTNAME, "http://10.74.5.8:1545");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andReturn("{}");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
@@ -266,16 +243,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_not_registered_no_port() throws Exception {
+ public void getMicroServiceIpAndPort_service_not_registered_no_port() throws Exception {
System.setProperty(HOSTNAME, "http://10.74.5.8");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andReturn("{}");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
@@ -285,16 +260,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_not_registered_only_ip() throws Exception {
+ public void getMicroServiceIpAndPort_service_not_registered_only_ip() throws Exception {
System.setProperty(HOSTNAME, "10.74.5.8");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
.andReturn("{}");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
@@ -304,16 +277,14 @@ public class MicroServiceConfigTest { }
@Test
- public void getServiceAddrInfo_msb_not_registered_full_addr_https() throws Exception {
+ public void getMicroServiceIpAndPort_service_not_registered_full_addr_https() throws Exception {
System.setProperty(HOSTNAME, "https://10.74.5.8:5432");
PowerMock.mockStaticPartial(MicroServiceConfig.class, "execQuery", String.class);
PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("[{\"ServiceAddress\": \"127.0.0.2\", \"ServicePort\": \"8080\"}]");
- PowerMock.expectPrivate(MicroServiceConfig.class, "execQuery", EasyMock.anyObject())
- .andReturn("{}");
+ .andReturn("[]");
PowerMock.replayAll();
- String[] msbInfo = getServiceAddrInfo();
+ String[] msbInfo = getMicroServiceIpAndPort();
PowerMock.verifyAll();
assertThat(msbInfo[0], equalTo("10.74.5.8"));
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java index ab2554f..e1b79bf 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java @@ -16,17 +16,12 @@ package org.onap.holmes.common.utils;
-import static org.onap.holmes.common.config.MicroServiceConfig.HOSTNAME;
-
import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
import javax.ws.rs.QueryParam;
-import org.easymock.EasyMock;
import org.junit.Rule;
-import org.junit.Test;
import org.onap.holmes.common.msb.MicroserviceBusRest;
import org.onap.holmes.common.api.entity.ServiceRegisterEntity;
import org.onap.holmes.common.config.MicroServiceConfig;
-import org.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.rule.PowerMockRule;
@@ -41,7 +36,7 @@ public class MSBRegisterUtilTest { private MicroserviceBusRest microserviceBusRest = new MicroserviceBusRestProxy();
private ServiceRegisterEntity initServiceEntity() {
- String[] serviceAddrInfo = MicroServiceConfig.getServiceAddrInfo();
+ String[] serviceAddrInfo = MicroServiceConfig.getMicroServiceIpAndPort();
ServiceRegisterEntity serviceRegisterEntity = new ServiceRegisterEntity();
serviceRegisterEntity.setServiceName("holmes-rule-mgmt");
serviceRegisterEntity.setProtocol("REST");
|