code: public SingleNodeAssert hasAttribute(String attributeName) {
          isNotNull();
  
          final Map.Entry<QName, String> entry = attributeForName(attributeName);
          if (entry == null) {
              throwAssertionError(shouldHaveAttribute(actual.getNodeName(), attributeName));
          }
          return this;
      }
docs: Verifies that node has attribute with given name.
  
  @throws AssertionError if the actual node is {@code null}.
  @throws AssertionError if node has not attribute with given name.