aboutsummaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/test/java/org/onap/msb/apiroute/wrapper/consulextend/cache/ServiceHealthCacheTest.java
blob: 03cc209500d2e3374c0869da478b2763a2f37f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
	}
}