### Question:
CommandUtil { public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (brokerNameSet.isEmpty()) { throw new Exception( "Make sure the specified clusterName exists or the nameserver which connected is correct."); } return brokerNameSet; }  static Map<String/*master addr*/, List<String>/*slave addr*/> fetchMasterAndSlaveDistinguish(
        final MQAdminExt adminExt, final String clusterName); static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName); static Set<String> fetchMasterAndSlaveAddrByClusterName(final MQAdminExt adminExt, final String clusterName); static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName); static String fetchBrokerNameByAddr(final MQAdminExt adminExt, final String addr);  }### Answer:
@Test public void testFetchBrokerNameByClusterName() throws Exception { Set<String> result = CommandUtil.fetchBrokerNameByClusterName(defaultMQAdminExtImpl, "default-cluster"); assertThat(result.contains("default-broker")).isTrue(); assertThat(result.contains("default-broker-one")).isTrue(); assertThat(result.size()).isEqualTo(2); }