SLSUtils { public static String[] getRackHostName(String hostname) { NodeBase node = new NodeBase(hostname); return new String[] {node.getNetworkLocation().substring(1), node.getName()}; }  static String[] getRackHostName(String hostname); static Set<NodeDetails> parseNodesFromRumenTrace(
      String jobTrace); static Set<NodeDetails> parseNodesFromSLSTrace(
      String jobTrace); static Set<NodeDetails> parseNodesFromNodeFile(
      String nodeFile, Resource nmDefaultResource); static Set<NodeDetails> generateNodes(int numNodes,
      int numRacks); final static String DEFAULT_JOB_TYPE; }
@Test public void testGetRackHostname() { String str = "/rack1/node1"; String rackHostname[] = SLSUtils.getRackHostName(str); Assert.assertEquals(rackHostname[0], "rack1"); Assert.assertEquals(rackHostname[1], "node1"); str = "/rackA/rackB/node1"; rackHostname = SLSUtils.getRackHostName(str); Assert.assertEquals(rackHostname[0], "rackA/rackB"); Assert.assertEquals(rackHostname[1], "node1"); }