03cc209500d2e3374c0869da478b2763a2f37f9f
[msb/apigateway.git] /
1 package org.onap.msb.apiroute.wrapper.consulextend.cache;
2
3 import org.junit.Assert;
4 import org.junit.Test;
5 import org.onap.msb.apiroute.wrapper.consulextend.Consul;
6 import org.onap.msb.apiroute.wrapper.consulextend.cache.ServiceHealthCache;
7
8 import com.orbitz.consul.option.CatalogOptions;
9
10 public class ServiceHealthCacheTest {
11
12         @Test
13         public void testnewCache() {
14                 Consul consul = Consul.newClient();
15                 ServiceHealthCache cache1 = ServiceHealthCache.newCache(
16                                 consul.healthClient(), "huangleibo");
17                 Assert.assertNotNull(cache1);
18
19                 ServiceHealthCache cache2 = ServiceHealthCache.newCache(
20                                 consul.healthClient(), "huangleibo", false,
21                                 CatalogOptions.BLANK, 10);
22                 Assert.assertNotNull(cache2);
23         }
24 }