### Question:
ConsumerGroupUtil { public static String getOriginConsumerName(String consumerGroupName) { if (consumerGroupName.indexOf("_") == -1) { return consumerGroupName; } else { return consumerGroupName.substring(0, consumerGroupName.lastIndexOf("_")); } }  static String getBroadcastConsumerName(String consumerGroupName, String ip, long consumerId); static String getOriginConsumerName(String consumerGroupName);  }### Answer:
@Test public void getOriginConsumerNameTest() { assertEquals("2_1", ConsumerGroupUtil.getOriginConsumerName("2_1_2-3")); assertEquals("2-3", ConsumerGroupUtil.getOriginConsumerName("2-3")); }