code: public static void addStaticResolution(String host, String resolvedName) {
      synchronized (hostToResolved) {
        hostToResolved.put(host, resolvedName);
      }
    }
docs: Adds a static resolution for host. This can be used for setting up
  hostnames with names that are fake to point to a well known host. For e.g.
  in some testcases we require to have daemons with different hostnames
  running on the same machine. In order to create connections to these
  daemons, one can set up mappings from those hostnames to "localhost".
  {@link NetUtils#getStaticResolution(String)} can be used to query for
  the actual hostname.
  @param host
  @param resolvedName