@Override
    public String queryJmxBeanValue(String hostname, int port, String beanName, String attributeName,
                                    boolean asQuery, boolean encrypted) {

      if (beanName.equalsIgnoreCase("Hadoop:service=NameNode,name=NameNodeStatus") && attributeName.equalsIgnoreCase("State") && asQuery) {
        switch (hostname) {
          case "H1":
            return Status.ACTIVE.toString();
          case "H2":
            return Status.STANDBY.toString();
          case "H3":
            return Status.ACTIVE.toString();
          case "H4":
            return Status.STANDBY.toString();

          default:
            return "UNKNOWN_NAMENODE_STATUS_FOR_THIS_HOST";
        }
      }
      return  "NOT_MOCKED";
    }
Mock the call to get JMX Values.
@param hostname host name
@param port port number
@param beanName if asQuery is false, then search for this bean name
@param attributeName if asQuery is false, then search for this attribute name
@param asQuery whether to search bean or query
@param encrypted true if using https instead of http.
@return
ambari-server/src/test/java/org/apache/ambari/server/stack/upgrade/orchestrate/UpgradeHelperTest.java