@Override
    public void updateClusterMetadata(String namespaceId, String serviceName, String clusterName,
            ClusterMetadata clusterMetadata) throws NacosException {
        String groupName = NamingUtils.getGroupName(serviceName);
        String serviceNameWithoutGroup = NamingUtils.getServiceName(serviceName);
        Optional<Service> service = ServiceManager.getInstance()
                .getSingletonIfExist(namespaceId, groupName, serviceNameWithoutGroup);
        if (!service.isPresent()) {
            throw new NacosException(NacosException.INVALID_PARAM, "service not found:" + serviceName);
        }
        metadataOperateService.addClusterMetadata(service.get(), clusterName, clusterMetadata);
    }
@Test
    void testUpdateClusterMetadata() throws NacosException {
        clusterOperatorV2Impl.updateClusterMetadata("namespace_test", "group_test@@name_test", "clusterName_test", clusterMetadata);
        verify(metadataOperateServiceMock).addClusterMetadata(any(Service.class), anyString(), any(ClusterMetadata.class));
    }