### Question:
NetworkTopologyImpl implements NetworkTopology { public Node getNode(String loc) { loc = NetUtils.normalize(loc); netlock.readLock().lock(); try { if (!ROOT.equals(loc)) { return clusterTree.getNode(loc); } else { return clusterTree; } } finally { netlock.readLock().unlock(); } } NetworkTopologyImpl(ConfigurationSource conf); @VisibleForTesting  NetworkTopologyImpl(NodeSchemaManager manager); void add(Node node); void remove(Node node); boolean contains(Node node); boolean isSameAncestor(Node node1, Node node2, int ancestorGen); boolean isSameParent(Node node1, Node node2); Node getAncestor(Node node, int ancestorGen); Node getNode(String loc); int getNumOfLeafNode(String loc); int getMaxLevel(); int getNumOfNodes(int level); Node chooseRandom(String scope); Node chooseRandom(String scope, List<String> excludedScopes); Node chooseRandom(String scope, Collection<Node> excludedNodes); Node chooseRandom(String scope, Collection<Node> excludedNodes,
      int ancestorGen); Node chooseRandom(String scope, List<String> excludedScopes,
      Collection<Node> excludedNodes, Node affinityNode, int ancestorGen); Node getNode(int leafIndex, String scope, List<String> excludedScopes,
      Collection<Node> excludedNodes, Node affinityNode, int ancestorGen); int getDistanceCost(Node node1, Node node2); List<? extends Node> sortByDistanceCost(Node reader,
      List<? extends Node> nodes, int activeLen); @Override String toString(); static final Logger LOG; }### Answer:
@Test public void testGetNode() { assertEquals(cluster.getNode(""), cluster.getNode(null)); assertEquals(cluster.getNode(""), cluster.getNode("/")); assertEquals(null, cluster.getNode("/switch1/node1")); assertEquals(null, cluster.getNode("/switch1")); }