code: public static Matcher<ContextElement> attributes(final Matcher<Map<String, Object>> matcher) {
      return new Matcher<ContextElement>() {
  
        @Override
        protected boolean matchesSafely(ContextElement t) {
          return matcher.matches(t.attributes());
        }
  
        @Override
        public String toString() {
          return "an attributes " + matcher;
        }
      };
    }
docs: Returns a matcher that matches context elements whose {@link ContextElement#attributes()}
  match against the supplied matcher.
  
  @param matcher a {@code Map} (attributes) matcher
  @return a {@code ContextElement} matcher