private Set<Long> getUnavailableBeIdsInGroup(SystemInfoService infoService, ColocateTableIndex colocateIndex,
                                                 GroupId groupId) {
        Set<Long> backends = colocateIndex.getBackendsByGroup(groupId);
        Set<Long> unavailableBeIds = Sets.newHashSet();
        for (Long backendId : backends) {
            if (!checkBackendAvailable(backendId, infoService)) {
                unavailableBeIds.add(backendId);
            }
        }
        return unavailableBeIds;
    }
@Test
    public void testGetUnavailableBeIdsInGroup() {
        GroupId groupId = new GroupId(10000, 10001);
        List<Long> allBackendsInGroup = Lists.newArrayList(1L, 2L, 3L, 4L, 5L);
        List<List<Long>> backendsPerBucketSeq = new ArrayList<>();
        backendsPerBucketSeq.add(allBackendsInGroup);
        ColocateTableIndex colocateTableIndex = new ColocateTableIndex();
        SystemInfoService infoService = new SystemInfoService();
        colocateTableIndex.addBackendsPerBucketSeq(groupId, backendsPerBucketSeq);

        Backend be2 = new Backend(2L, "", 2002);
        be2.setAlive(true);
        infoService.replayAddBackend(be2);

        Backend be3 = new Backend(3L, "", 3003);
        be3.setAlive(false);
        be3.setLastUpdateMs(System.currentTimeMillis() - Config.tablet_sched_colocate_be_down_tolerate_time_s * 1000 * 2);
        infoService.replayAddBackend(be3);

        Backend be4 = new Backend(4L, "", 4004);
        be4.setAlive(false);
        be4.setLastUpdateMs(System.currentTimeMillis());
        infoService.replayAddBackend(be4);

        Backend be5 = new Backend(5L, "", 5005);
        be5.setDecommissioned(true);
        infoService.replayAddBackend(be5);

        GlobalStateMgr.getCurrentState().getNodeMgr().getClusterInfo().getIdToBackend();

        Set<Long> unavailableBeIds = Deencapsulation
                .invoke(balancer, "getUnavailableBeIdsInGroup", infoService, colocateTableIndex, groupId);
        Assert.assertArrayEquals(new long[] {1L, 3L, 5L},
                unavailableBeIds.stream().mapToLong(i -> i).sorted().toArray());
    }