ClusterCmdUtil { public static int getIndexFromNodeName(String node) { AuAssert.check(node != null && !node.isEmpty()); String[] ary = node.split("-"); AuAssert.check(ary.length == 3); return Integer.parseInt(ary[2]); }  static String getLogLevel(); static int getIndexFromNodeName(String node);  }
@Test public void testGetIndexFromNodeName() { String node = "test-worker-0"; assertEquals(ClusterCmdUtil.getIndexFromNodeName(node), 0); }