code: public <V> V getAttachment(final AttachmentKey<V> key) {
          assert key != null;
          return key.cast(contextAttachments.get(key));
      }
docs: Retrieves an object that has been attached to this context.
  
  @param key the key to the attachment.
  @param <V> the value type of the attachment.
  
  @return the attachment if found otherwise {@code null}.