private Upstream(final Builder builder) {
        this.protocol = builder.protocol;
        this.url = builder.url;
        this.weight = builder.weight;
        this.status = builder.status;
        this.timestamp = builder.timestamp;
        this.warmup = builder.warmup;
        this.group = builder.group;
        this.version = builder.version;
    }
@Test
    public void upstreamTest() {
        Upstream upstream = Upstream.builder()
                .group("group")
                .url("url")
                .timestamp(1)
                .warmup(1)
                .version("version")
                .weight(1)
                .status(true)
                .build();
        upstream.setGroup("group");
        upstream.setHealthy(true);
        upstream.setUrl("url");
        upstream.setLastHealthTimestamp(1L);
        upstream.setStatus(true);
        upstream.setLastUnhealthyTimestamp(1L);
        upstream.setVersion("version");
        Assertions.assertEquals(upstream.buildDomain(), "http://url");
        Assertions.assertEquals(upstream.getGroup(), "group");
        Assertions.assertNull(upstream.getProtocol());
        Assertions.assertEquals(upstream.getLastHealthTimestamp(), 1L);
        Assertions.assertEquals(upstream.getLastUnhealthyTimestamp(), 1L);
        Assertions.assertEquals(upstream.getUrl(), "url");
        Assertions.assertEquals(upstream.getWarmup(), 1);
        Assertions.assertEquals(upstream.getWeight(), 1);
        Assertions.assertEquals(upstream.getVersion(), "version");
        Assertions.assertEquals(upstream.getTimestamp(), 1);
        Assertions.assertTrue(upstream.isHealthy());
        Assertions.assertTrue(upstream.isStatus());
        Upstream upstream2 = Upstream.builder()
                .protocol("https://")
                .url("url")
                .weight(1)
                .status(true)
                .build();
        Assertions.assertEquals(upstream2.buildDomain(), "https://url");
        Assertions.assertNotEquals(upstream, upstream2);
        Assertions.assertNotEquals(upstream, null);
        Assertions.assertNotEquals(upstream, "");
        Assertions.assertEquals(upstream, upstream);
        Upstream upstream3 = Upstream.builder()
                .protocol("https://")
                .url("url")
                .weight(1)
                .status(true)
                .build();
        Assertions.assertEquals(upstream2, upstream3);
        Assertions.assertNotNull(upstream2.toString());
        Assertions.assertTrue(upstream2.hashCode() >= 0);
    }