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); static void generateNodeTableMapping(Set<NodeDetails> nodeDetails,
      String filePath); final static String DEFAULT_JOB_TYPE; }
@Test public void testGetRackHostname() { String str = "/rack1/node1"; String rackHostname[] = SLSUtils.getRackHostName(str); Assert.assertEquals("rack1", rackHostname[0]); Assert.assertEquals("node1", rackHostname[1]); str = "/rackA/rackB/node1"; rackHostname = SLSUtils.getRackHostName(str); Assert.assertEquals("rackA/rackB", rackHostname[0]); Assert.assertEquals("node1", rackHostname[1]); }