private static boolean nodeHasExactAttributes(Node node, HashMap<String, String> attributes,
      boolean checkSimilarValues) {
    NamedNodeMap nodeAttrs = node.getAttributes();

    // Check to make sure the node has all attribute fields
    for (String key : attributes.keySet()) {
      Node attr = nodeAttrs.getNamedItem(key);
      if (attr == null
          || checkSimilarValues && !attr.getTextContent().equals(attributes.get(key))) {
        return false;
      }
    }

    // Check to make sure the node does not have more than the attribute fields
    for (int i = 0; i < nodeAttrs.getLength(); i++) {
      String attr = nodeAttrs.item(i).getNodeName();
      if (attributes.get(attr) == null || checkSimilarValues
          && !attributes.get(attr).equals(nodeAttrs.item(i).getTextContent())) {
        return false;
      }
    }

    return true;
  }
Checks to see whether the given XML node has the exact attributes given in the attributes
hashmap

@param checkSimilarValues If true, will also check to make sure that the given node's
       attributes also have the exact same values as the ones given in the attributes HashMap.
@return True if the node has only the attributes the are given by the HashMap (no more and no
        less attributes). If {@param checkSimilarValues} is true then only returns true if the
        node shares attributes with the given attribute list exactly.
geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/ContainerInstall.java