public Collection<Member> listNodes(String address, NodeState nodeState) throws NacosException {
        
        Collection<Member> members = memberManager.allMembers();
        Collection<Member> result = new ArrayList<>();
        
        for (Member member : members) {
            if (StringUtils.isNoneBlank(address) && !StringUtils.startsWith(member.getAddress(), address)) {
                continue;
            }
            if (nodeState != null && member.getState() != nodeState) {
                continue;
            }
            result.add(member);
        }
        return result;
    }
@Test
    void testListNodes() throws NacosException {
        Member member1 = new Member();
        member1.setIp("1.1.1.1");
        member1.setPort(8848);
        member1.setState(NodeState.DOWN);
        Member member2 = new Member();
        member2.setIp("2.2.2.2");
        member2.setPort(8848);
        List<Member> members = Arrays.asList(member1, member2);
        
        when(serverMemberManager.allMembers()).thenReturn(members);
        
        Collection<Member> result1 = nacosClusterOperationService.listNodes("1.1.1.1", null);
        assertTrue(result1.stream().findFirst().isPresent());
        assertEquals("1.1.1.1:8848", result1.stream().findFirst().get().getAddress());
        
        Collection<Member> result2 = nacosClusterOperationService.listNodes(null, NodeState.UP);
        assertTrue(result2.stream().findFirst().isPresent());
        assertEquals("2.2.2.2:8848", result2.stream().findFirst().get().getAddress());
    }