aboutsummaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java')
-rw-r--r--apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java b/apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java
new file mode 100644
index 0000000..03cc209
--- /dev/null
+++ b/apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java
@@ -0,0 +1,24 @@
+package org.onap.msb.apiroute.wrapper.consulextend.cache;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.msb.apiroute.wrapper.consulextend.Consul;
+import org.onap.msb.apiroute.wrapper.consulextend.cache.ServiceHealthCache;
+
+import com.orbitz.consul.option.CatalogOptions;
+
+public class ServiceHealthCacheTest {
+
+ @Test
+ public void testnewCache() {
+ Consul consul = Consul.newClient();
+ ServiceHealthCache cache1 = ServiceHealthCache.newCache(
+ consul.healthClient(), "huangleibo");
+ Assert.assertNotNull(cache1);
+
+ ServiceHealthCache cache2 = ServiceHealthCache.newCache(
+ consul.healthClient(), "huangleibo", false,
+ CatalogOptions.BLANK, 10);
+ Assert.assertNotNull(cache2);
+ }
+}