@@ -0,0 +1,1309 @@
+package redis.embedded.util;%0A%0Aimport com.google.common.collect.ImmutableSet;%0Aimport org.junit.Test;%0Aimport redis.embedded.RedisServer;%0Aimport redis.embedded.SentinelCluster;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0A%0Apublic class JedisUtilTest %7B%0A%0A    private static Set%3CString%3E hosts = new HashSet%3C%3E();%0A%0A    static %7B%0A        hosts.add(%22localhost:1%22);%0A        hosts.add(%22localhost:2%22);%0A        hosts.add(%22localhost:3%22);%0A    %7D%0A%0A    @Test%0A    public void jedisHosts() %7B%0A        RedisServer server = new RedisServer.Builder().port(1).build();%0A        Set%3CString%3E host = new HashSet%3C%3E();%0A        host.add(%22localhost:1%22);%0A%0A        assertThat(JedisUtil.jedisHosts(server), equalTo(host));%0A    %7D%0A%0A    @Test%0A    public void sentinelHosts() %7B%0A        SentinelCluster sentinelCluster = new SentinelCluster.Builder()%0A                .sentinelPorts(Arrays.asList(1, 2, 3))%0A                .build();%0A%0A        assertThat(JedisUtil.sentinelHosts(sentinelCluster), equalTo(hosts));%0A    %7D%0A%0A    @Test%0A    public void portsToJedisHosts() %7B%0A        List%3CInteger%3E integers = Arrays.asList(1, 2, 3);%0A%0A        assertThat(JedisUtil.portsToJedisHosts(integers), equalTo(hosts));%0A    %7D%0A%7D%0A

Add tests for JedisUtils