### Question:
JedisFactory { @JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } }  @JsonProperty void setUrl(URI uri); HostAndPort getEndpoint(); void setEndpoint(HostAndPort endpoint); String getHost(); int getPort(); String getPassword(); void setPassword(String password); int getMinIdle(); void setMinIdle(int minIdle); int getMaxIdle(); void setMaxIdle(int maxIdle); int getMaxTotal(); void setMaxTotal(int maxTotal); boolean getSsl(); void setSsl(boolean ssl); int getTimeout(); void setTimeout(int timeout); JedisPool build(Environment environment); static final int DEFAULT_PORT; static final int DEFAULT_MAX_TOTAL; }### Answer:
@Test public void setsEndpointFromUrl() throws Exception { factory.setUrl(new URI("redis: assertThat(factory).hasHost("foohost"); assertThat(factory).hasPort(1234); }
@Test public void setsPasswordFromUrl() throws Exception { factory.setUrl(new URI("redis: assertThat(factory).hasPassword("swordfish"); }
@Test public void setsSslFromUrl() throws Exception { factory.setUrl(new URI("rediss: assertThat(factory).hasSsl(true); }