@Test
    public void upstreamTest() {
        Upstream upstream = Upstream.builder()
                .group("group")
                .url("url")
                .timestamp(1)
                .warmup(1)
                .version("version")
                .gray(false)
                .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);
    }
The type Upstream check task test.
shenyu-loadbalancer/src/test/java/org/apache/shenyu/loadbalancer/entity/UpstreamTest.java