code: public static Map<String, Object> getProperties(Stanza packet) {
          JivePropertiesExtension jpe = (JivePropertiesExtension) packet.getExtension(JivePropertiesExtension.NAMESPACE);
          if (jpe == null) {
              return Collections.emptyMap();
          }
          return jpe.getProperties();
      }
docs: Return a map of all properties of the given packet. If the stanza contains no properties
  extension, an empty map will be returned.
  
  @param packet
  @return a map of all properties of the given packet.