### Question:
NetUtils { public static String normalize(String path) { if (path == null) { return NetConstants.ROOT; } int len = path.length(); if (len == 0) { return NetConstants.ROOT; } if (path.charAt(0) != NetConstants.PATH_SEPARATOR) { throw new IllegalArgumentException( "Network Location path does not start with " + NetConstants.PATH_SEPARATOR_STR + ": " + path); } return len == 1 ? path : StringUtils.removeEnd(path, NetConstants.PATH_SEPARATOR_STR); } private  NetUtils(); static String normalize(String path); static int locationToDepth(String location); static void removeDuplicate(NetworkTopology topology,
      Collection<Node> mutableExcludedNodes, List<String> mutableExcludedScopes,
      int ancestorGen); static List<Node> getAncestorList(NetworkTopology topology,
      Collection<Node> nodes, int generation);  }### Answer:
@Test public void testNormalize() { assertEquals("", NetUtils.normalize(null)); assertEquals("", NetUtils.normalize("")); assertEquals("/", NetUtils.normalize("/")); assertThrows(IllegalArgumentException.class, () -> NetUtils.normalize("x")); assertEquals("/a/b/c", NetUtils.normalize("/a/b/c")); assertEquals("/a/b/c/$", NetUtils.normalize("/a/b/c/$")); }