SentinelUtil { public static SentinelInfo getSentinelInfoFromMonitorName(String monitorName) { return SentinelInfo.fromMonitorName(monitorName); }  static String getSentinelMonitorName(String clusterName, String monitorName, String idc); static SentinelInfo getSentinelInfoFromMonitorName(String monitorName);  }
@Test public void getSentinelMonitorDcAndName() { Assert.assertEquals(activeDc, SentinelUtil.getSentinelInfoFromMonitorName(monitorName + '+' + activeDc).getIdc()); Assert.assertEquals(monitorName, SentinelUtil.getSentinelInfoFromMonitorName(monitorName + '+' + activeDc).getShardName()); }